[plt-dev] logging: strings vs. sexps

From: Dave Herman (dherman at ccs.neu.edu)
Date: Thu Feb 19 16:34:31 EST 2009

> vs.
> 
> Someone writes it in a planet package; everyone and their brother imports it.

     (define-syntax-rule (log-info-sexp sexp)
       (log-info (format "~v" sexp)))

is actually easier to write and remember than

     (require (planet cce/logging-utils:4/sexp))

and they're both just annoying enough to noticeably degrade the 
convenience of logging.

I would put down my preference at something like having a 
`current-log-formatter' parameter of type (any -> string) whose default 
value is

    (lambda (x) (format "~v" x))

but that could be replaced by the identity function if you want to 
choose your own format.

But this isn't up to me; I'll bow out now.

Dave


Posted on the dev mailing list.