[hunchentoot-devel] Logging API and default behavior changed

Hans Hübner hans.huebner at gmail.com
Sun Jan 23 09:49:16 UTC 2011


Hi,

I have made an incompatible change to Hunchentoot's logging API
(http://bknr.net/trac/changeset/4639).

To sum up:  The old special variables to configure the log paths as
well as the -logger slots in the acceptors are gone.  Instead,
Hunchentoot now has per-acceptor slots containing the log pathnames,
if any.  Logging is performed by calling the ACCEPTOR-LOG-ACCESS and
ACCEPTOR-LOG-MESSAGE generic functions that can be specialized for
derived logger classes.

Previously, it was possible to disable logging altogether by setting
the log pathnames to NIL, which also was the default.  I have changed
that so that if a log pathname is NIL, the log entry is written to
CL:*ERROR-OUTPUT* instead.  This seems to be a more helpful behavior.
If an application desires to switch off logging completely, it now
needs to either set the log pathnames to "/dev/null" (wasteful, but
quick) or implement methods for the logging functions above.

Please let me know if there are any problems with this change, apart
from the incompatibility.

-Hans




More information about the Tbnl-devel mailing list