[plt-dev] logging: strings vs. sexps

From: Eli Barzilay (eli at barzilay.org)
Date: Thu Feb 19 16:42:25 EST 2009

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!


Posted on the dev mailing list.