[logback-user] Timing of sifting appender dynamic appender instantiation

Stuart Rossiter stuart.p.rossiter at gmail.com
Thu Mar 28 13:38:01 CET 2013


The manual states that appenders get dynamically added by SiftingAppender
when the relevant MDC key is altered:

"Whenever the "userid" MDC key is assigned a new value, a new FileAppender
instance will be built from scratch."

However, I found that it was only created when I logged my first message
using a relevant Logger. (And confirmed this by using an
OnConsoleStatusListener in my configuration file.) Is this a bug? A
documentation error?

This is a problem because I need to programmatically adjust this appender
(from the 'base' set up by the configuration file) before I use it. I
currently have to log a spurious message first so that the appender is
created, and then adjust it.

Stuart

-- 
________________________________
Stuart Rossiter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20130328/1230a0f9/attachment.html>


More information about the Logback-user mailing list