[hunchentoot-devel] Logging API and default behavior changed

Daniel Weinreb dlw at itasoftware.com
Mon Jan 24 21:19:38 UTC 2011


Hans,

Hans Hübner wrote:
> 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.
>   
Definitely a good change.

Just to make sure, the old special variables only
mattered if you used the default logger functions,
right?  In our system, we always provide our
own logger functions, so those special variables
were not used, as far as I know.

The per-acceptor slots containing the log pathnames
are used by the default methods, and are available
for custom (subclass) methods, but have no effect
if you provide your own methods that do not use them,
right?

I'm just checking to be sure.

-- Dan
> 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
>
> _______________________________________________
> tbnl-devel site list
> tbnl-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/tbnl-devel
>   




More information about the Tbnl-devel mailing list