[racket] 5.3's "mzc optimizer" log-debug, and log "facility" in general

From: Neil Van Dyke (neil at neilvandyke.org)
Date: Tue Sep 4 17:02:49 EDT 2012

Greg Hendershott wrote at 09/04/2012 03:13 PM:
> - I'd want to control visibility via the REPL, more often than via env
> vars (personally).

My most *important* use of logging facilities is for debugging problems 
on server apps in production.  My most *frequent* use of logging is in 
early development, but there I could get by with unit testing if I had to.

> - I'd want to choose different levels for different modules. Most
> commonly that would be an elevated level for a few specific modules,
> and a lower level for "all other".  For example, "I want 'debug for
> under-dev.rkt, and 'warning for all others".

Agreed.  One large app I know has several different logging mechanisms 
(added at different times for different purposes, and there hasn't yet 
been occasion to consolidate these, even if Racket's logging had 
sufficient selectivity to do that).  One of those logging mechanisms is 
used by a few modules that implement different phases of a process.  
During development, logging using that mechanism could be enabled on a 
pure-module basis, which was very helpful, considering how detailed the 
logging and how large the data.

> - I suppose it could be handy to use a path notation for this. e.g. I
> want 'debug level for "racket/*" or just for "racket/xrepl".  (This
> assumes the logs emit per-module, not per-"library".)

If this comes naturally from using submodules in the way you suggest, 
that seems elegant.  But what if I want logging aspects that don't match 
1:1 with module boundaries?

Neil V.

Posted on the users mailing list.