Return to Snippet

Revision: 19362
at October 22, 2009 08:38 by ff1959

Initial Code
if(logger instanceof Log4JLogger)
      Log4JLogger log4j = (Log4JLogger)logger;
      Logger underlyingLogger = log4j.getLogger();
      underlyingLogger.addAppender(new ConsoleAppender(
                                     new PatternLayout("%-5p [%t]: %m%n")));

Initial URL

Initial Description
This snippet shows how to get access to the underlying log4j logger when using apache commons logging.

Initial Title
get underlying log4 logger from commons logger

Initial Tags

Initial Language