Replying to myself as i found the solution over the web.

I had to call LoggerContext reset() and then ContextInitializer autoConfig() 
for the logging to be effective again after LoggerContext stop() & start(), as 
described here : http://stackoverflow.com/a/3810936

Mathieu
----- Message d'origine -----
De : Mathieu Stempell
Envoyés : 20.02.13 15:28
À : [email protected]
Objet : [logback-dev] stop() and start() on LoggerContext

Hello,

When i call start() method on LoggerContext after i called stop(), i doesn't 
log anything new in the output files :
-----------
 LoggerContext loggerContext = (LoggerContext)LoggerFactory.getILoggerFactory();
 LoggerFactory.getLogger(AbstractTest.class).info("test info before stop"); // 
logs, ok
 loggerContext.stop();
 LoggerFactory.getLogger(AbstractTest.class).info("test info between stop and 
start"); // doesn't log, ok
 loggerContext.start();
 LoggerFactory.getLogger(AbstractTest.class).info("test info after start"); // 
doesn't log, why???
-----------

Is it normal or not?

Thanks in advance for your anwser.

Mathieu
_______________________________________________
logback-dev mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/logback-dev

Reply via email to