C
christriddle
Hi,
I am trying to get the log4j logger to work with tomcat. I have used
the following log4j.properties file in the /common/classes directory:
log4j.rootLogger=debug, 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
I also have log4j.jar in the lib directory, tomcat-juli.jar in the bin
(downloaded off the net, not built using the ant script - is this ok?)
and tomcat-juli-adapters.jar in the lib dir.
When I restart tomcat, it comes p with two warnings:
No appenders could be found for logger
(org.apache.catalina.startup.Embedded)
Please initilize the log4j system properly. - I find this particularly
helpfull!!
I'm not sure what's going on. I'm relatively new at all this, and the
documentation on the net is pretty trim.
Is there any suggestions?
Many thanks,
Chris
I am trying to get the log4j logger to work with tomcat. I have used
the following log4j.properties file in the /common/classes directory:
log4j.rootLogger=debug, 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
I also have log4j.jar in the lib directory, tomcat-juli.jar in the bin
(downloaded off the net, not built using the ant script - is this ok?)
and tomcat-juli-adapters.jar in the lib dir.
When I restart tomcat, it comes p with two warnings:
No appenders could be found for logger
(org.apache.catalina.startup.Embedded)
Please initilize the log4j system properly. - I find this particularly
helpfull!!
I'm not sure what's going on. I'm relatively new at all this, and the
documentation on the net is pretty trim.
Is there any suggestions?
Many thanks,
Chris