I have a servlet and I want to log in the file: catalina-< date >.log. The configuration file log4j.properties (located in catalina.home/lib) is the same as in the http://tomcat.apache.org/tomcat-6.0-doc/logging.html (log4j paragraph):
log4j.appender.CATALINA=org.apache.log4j.DailyRollingFileAppender
log4j.appender.CATALINA.File=${catalina.base}/logs/catalina.
log4j.appender.CATALINA.Append=true
log4j.appender.CATALINA.Encoding=UTF-8
# Roll-over the log once per day
log4j.appender.CATALINA.DatePattern='.'yyyy-MM-dd'.log'
log4j.appender.CATALINA.layout = org.apache.log4j.PatternLayout
log4j.appender.CATALINA.layout.ConversionPattern = %d [%t] %-5p %c- %m%n
The problem is that it doesnt log in the catalina-< date >.log but in the catalina. It appears that the appender is not configured properly. The file catalina appears to be created from log4j.appender.CATALINA.File=${catalina.home}/logs/catalina. in the configuration.
Can anyone help me with this problem?