[plt-dev] logging: strings vs. sexps
On Feb 19, Matthew Flatt wrote:
>
> What if we change it to
>
> (let ([l (current-logger)])
> (when (log-level? l 'error)
> (let ([v expr])
> (log-message l 'error (format "~s" v) v))))
>
> ?
>
> This changes both the formatting and the value supplied to log
> receivers by `log-error'. Programmers who want more control over the
> message and data can still use `log-message'.
This looks to me like it will make
(log-error "something bad happened")
a very common mistake.
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://www.barzilay.org/ Maze is Life!