
Hi Ceki, I mean the context of StatusListener, which is ContextAware, is not set by the StatusListenerAction. In StatusListenerAction: statusListener = (StatusListener) OptionHelper.instantiateByClassName( className, StatusListener.class, context); ec.getContext().getStatusManager().add(statusListener); ec.pushObject(statusListener) It does not set context to the StatusListener. But I expect it would be similar to AppenderAction, which sets context to the appender. appender = (Appender) OptionHelper.instantiateByClassName(className, ch.qos.logback.core.Appender.class, context); appender.setContext(context); Cheers, Tom On Tue, Dec 8, 2009 at 6:48 PM, Ceki Gulcu <ceki@qos.ch> wrote:
Hello Tom,
Whenever an action is placed in the rule store by a configurator, the context is set. See also SimpleRuleStore.addRule() method.
So the context of StatusListenerAction is set at the time where it is actually invoked. Are you observing a different behavior?
Cheers,
-- Ceki
Tom Liu wrote:
Hi,
In logback 0.9.17/0.9.18, StatusListenerAction does not set context to ContextAware StatusListener. Is it by design?
Thanks, Tom
_______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user