application logging does not output when packaging both commons-logging and log4j in EAP 6
Issue
I packaged both commons-logging and log4j libraries and the following logging configuration into my application. But application logging did not output.
log4j.properties
:
log4j.rootCategory=INFO,consoleLog,fileLog
log4j.appender.consoleLog=org.apache.log4j.ConsoleAppender
log4j.appender.consoleLog.Target = System.out
log4j.appender.consoleLog.layout = org.apache.log4j.PatternLayout
log4j.appender.consoleLog.layout.ConversionPattern=[%d{yyyy/MM/dd HH:mm:ss}][%p][%c{1}] %m%n
log4j.appender.fileLog=org.apache.log4j.FileAppender
log4j.appender.fileLog.File = /path/to/logfile
log4j.appender.fileLog.layout = org.apache.log4j.PatternLayout
log4j.appender.fileLog.layout.ConversionPattern=[%d{yyyy/MM/dd HH:mm:ss}][%p][%c{1}] %m%n
commons-logging.properties
:
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
Environment
- JBoss Enterprise Application Platform (EAP) 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.