Change of log-level shuld effect all loggers

  • Boris Prochazka

    Boris Prochazka - 2009-10-01

    I have noticed a problem in the microlog-20090927 snapshot that the logger has to be configured before I turn to the LoggerFactory for a logger object otherwise a change of the default log level will not have any effect.

    I would like to suggest that a change in the log-level also effects already created logging objects.

    Why: Its a common practice from using log4j to initialize the log object at the same time you declare the log object in its class.
    class MyClass {
    private static final Logger s_log = LoggerFactory.getLogger(MyClass.class);

    do() { s_log.debug("message"); }

    The logger object gets automatic created when the class is loaded by the java runtime and is ready to be used from the first line of code in the class. Very handy and convenient. Currently if the log level is changed later,  all classes loaded up to the configuration point  will be stick with the previous log-level.

  • Johan Karlsson

    Johan Karlsson - 2009-10-01


    I will take a look at this tonight. It sounds reasonable to do it the way you suggest.


  • Boris Prochazka

    Boris Prochazka - 2009-10-02

    I look forward to your new drop with this fix, thanks.

  • Nobody/Anonymous


    I am sorry but I am a little bit delayed. Will try to fix this before the 2.0 final release.



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks