[logback-user] Logging crossing contexts

Chris Rompot crompot at gmail.com
Sat Aug 25 23:26:55 CEST 2012


I was easily able to solve my logging crossing contexts problem after
creating a unit test and reading this Javadoc for org.slf4j.LoggerFactory:
getILoggerFactory() - Return the ILoggerFactory instance in use.

When I mimicked your "Invoking JoranConfigurator directly" example from
"Chapter 3: Logback configuration" of your manual, I copied this line:

LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();

and needed to replace it with:

LoggerContext context = new LoggerContext();

Once I did so, problem solved.  Thanks for the great and timely support,
Chris


Ceki Gulcu wrote:
> 
> At this stage, I unit test reproducing the issue would be helpful.
> 
-- 
View this message in context: http://old.nabble.com/Logging-crossing-contexts-tp34292668p34348171.html
Sent from the Logback User mailing list archive at Nabble.com.



More information about the Logback-user mailing list