[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: About logging / reporting



Yes, but in the  end this is equivalent to passing
untouched values to  some output port. I seriously
doubt  anything else could  be safely  done, apart
concatenating  as   in  your  example,  especially
because  "no attempt  is made  to  standardize the
string values they return".  Thus as the intention
is to  report, then doing so  without resorting to
intermediate values is IMHO the way to go.

--
Emmanuel Medernach


On Sat, Aug 17, 2013 at 7:10 PM, Alexey Radul <axofch@xxxxxxxxx> wrote:
Because then you couldn't do this:

(define (log-error msg)
  (send-to-logging-server
   (printf-to-string "The widget on %s, running %s under %s on %s barfed because\n%s"
    (machine-name) (implementation-name) (os-name) (cpu-architecture) msg)))

Strings one does not inspect can still be manipulated in many very
useful ways on their way to the outside world.

~Alexey



On Sat, Aug 17, 2013 at 12:54 PM, Emmanuel Medernach <emmanuel.medernach@xxxxxxxxx> wrote:
Hello,

As this  is intended to be a  logging/reporting facility why
not  having  only   output  functions  instead  of  function
returning strings ? Anyway these strings are not meant to be
mutated nor to  base decisions on their values,  but only to
provide helpful context to the users.

I  mean for instance  instead of  '(implementation-name)' to
provide '(display-implementation-name)'.

Just my two cents (and I hope this is not far too late for comments).
--
Emmanuel Medernach