[plt-dev] logging: strings vs. sexps

From: YC (yinso.chen at gmail.com)
Date: Thu Feb 19 16:22:25 EST 2009

On Thu, Feb 19, 2009 at 1:17 PM, Eli Barzilay <eli at barzilay.org> wrote:

> > I think that's where logging sexp (or other objects) would be
> > useful.  For example, have the log receiver receiving a sexp and
> > immediately handle the information contained in sexp without having
> > to incur the cost of parsing.
> There are at least two features of the current system that provide
> answers for this: the `log-info' and its friends are macros -- they
> don't do anything if there is no receiver, which makes it convenient
> to give them an argument that will do whatever processing you want to
> do.  So you can pass around sexprs, and do whatever you want to do
> with them before you turn them into strings for the output.  Also,
> `log-message' receives an argument that contains arbitrary
> information, which you can use to hook additional bits.

Okay - I'll look into how that works.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20090219/a845c12a/attachment.html>

Posted on the dev mailing list.