Posted By:
Broken_Bone
Posted On:
Friday, April 11, 2008 02:39 AM
Hi I'm trying to configure log4j in my web application (built with Oracle ADF (JSF)). I've copied the jar into WEB-INF/lib folder, created log4j.properties and put it to WEB-INF folder and modified orion-application by adding (I've removed < and > from the XML part because of formatting) imported-shared-libraries remove-inherited name="apache.commons.logging" /remove-inherited /imported-shared-libraries When I deploy this application to Oracle AS and restart opmn I can see the log file saying 08/04/10 14:44:38 log4j:WARN No appenders could be found for logger (com.sun.faces.config.ConfigureListener). 0
More>>
Hi
I'm trying to configure log4j in my web application (built with Oracle ADF (JSF)). I've copied the jar into WEB-INF/lib folder, created log4j.properties and put it to WEB-INF folder and modified orion-application by adding (I've removed
< and > from the XML part because of formatting)
imported-shared-libraries
remove-inherited name="apache.commons.logging"
/remove-inherited
/imported-shared-libraries
When I deploy this application to Oracle AS and restart opmn I can see the log file saying
08/04/10 14:44:38 log4j:WARN No appenders could be found for logger (com.sun.faces.config.ConfigureListener).
08/04/10 14:44:38 log4j:WARN Please initialize the log4j system properly.
I've even tried modifying boot.xml found in oc4j.jar library but the warnings are still there.
My log4j.properties file is picked by the server (as I can see using File Monitor) and it looks like this:
# Set root logger level to DEBUG and its only appender to A1.
log4j.rootLogger=ERROR, A1, A2
log4j.logger.
=INFO
log4j.logger.oracle=WARNING
# A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender
# A1 uses PatternLayout.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
# OLD: %-4r [%t] %-5p %c %x - %m%n
log4j.appender.A1.layout.ConversionPattern=%-5p %c %x - %m%n
# A2 is set to be a RollingFileAppender.
log4j.appender.A2=org.apache.log4j.RollingFileAppender
log4j.appender.A2.layout=org.apache.log4j.PatternLayout
log4j.appender.A2.layout.ConversionPattern=%d{dd.MM.yyyy HH:mm:ss} [%t] (%F:%L) %-5p %c %x - %m%n
log4j.appender.A2.File=../SSN/log/
.log
log4j.appender.A2.Threshold=INFO
log4j.appender.A2.ImmediateFlush=true
log4j.appender.A2.Append=False
log4j.appender.A2.MaxFileSize=10000KB
log4j.appender.A2.MaxBackupIndex=5
I'd appreciate any tips on what I'm doing wrong here since I'm struggling with this for a while now.
Thank you in advance.
BB
<<Less