...just had a call with a user who had the problem to get log4j to work inside the Tomcat environment. Well, the problem was solved in the meantime - so I publish what was done in this forum:
Symtom:
The following messages appear when starting Tomcat:
log4j:WARN No appenders could be found for logger (com.sun.faces.config.ConfigureListener).
log4j:WARN Please initialize the log4j system properly.
...and log4j was in general not properly working within the webapp.
Solution: add the following log4j.properties file to /tomcat/lib/ (<== or the corresponding directory in Tomcat5 versions):
Code:
log4j.rootLogger=info, R
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=${catalina.home}/logs/tomcat.log
log4j.appender.R.MaxFileSize=10MB
log4j.appender.R.MaxBackupIndex=10
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
log4j.logger.org.apache.catalina=DEBUG, R
Maybe other log4j users have somme additional experience: please add to this post... Thanks!
Björn
PS: I have to add: CaptainCasa is internally using the default logging coming with Java, so I am not the log4j expert...