[logback-dev] Setting the logger level through JMX not working (duplicated context)

Sergio Pintos spintos at gmail.com
Mon Apr 13 17:17:43 CEST 2015


Hi,

While setting the logger level through the JConsole (via jmx), the JConsole
applies the operation successfully but nothing happens on the actual logger
implementation.

Apparently, there are two LoggerContext instances on the classloader. I
don't know if this is normal or not. I'm debugging logack and I'm seeing
that the Logger's object instance the JConsole is using is different than
the instance used by my application.

I have some screenshots so you can get a better understanding  of this:

This is while setting the logger lvl through the JConsole:

Parent Logger: http://image.gxzone.com/images/2/7/27755de3ab7.png
Logger Context: http://image.gxzone.com/images/4/e/4ee00ced572.png
Children List: http://image.gxzone.com/images/3/e/3e27e1cc19d.png

This is while trying to log from my application:

Child Logger: http://image.gxzone.com/images/5/5/55c5e233a0e.png
Parent Logger: http://image.gxzone.com/images/3/b/3b6428908e0.png
You can also see the logger's context on these images.

The id's that eclipse is showing are different on each case, thus we have
two object instances of the Logger and Logger Context.

I really appreciate if you guys could help me out since I've been working
on this several days and I'm stuck.

Thanks,
Sergio.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-dev/attachments/20150413/e4e2d520/attachment.html>


More information about the logback-dev mailing list