|
||||||||
|
This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira |
||||||||
_______________________________________________ logback-dev mailing list [email protected] http://mailman.qos.ch/mailman/listinfo/logback-dev

Hello, I didn't know this project. After checking, I dislike the way it intercept (ie print but not write).
I already write an interception code (on write) and it is working without limitation.
However I have to use reflection and reload logback (+- 200ms), the method I ask is just a way to improve performance and maintenance.
LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory(); ContextInitializer ci = new ContextInitializer(loggerContext); URL url = "" class="code-keyword">true); try { JoranConfigurator configurator = new JoranConfigurator(); configurator.setContext(loggerContext); loggerContext.reset(); configurator.doConfigure(url); } catch (JoranException je) { // StatusPrinter will handle this } StatusPrinter.printInCaseOfErrorsOrWarnings(loggerContext);I think about another clean solution if logback provides a way to install a hook just after slf4j call, so I can set a thread local.
I also think about checking the stack and looking for a subclass of slf4j logger however Reflection.caller will be removed and it is not a performant solution.