I have a web application running in a vanilla install of Tomcat 7 on Windows with the internal Tomcat logging left unchanged (default). In my application I use log4j which has a RollingFileAppender writing to my own application log (app.log) in the TOMCAT/logs directory (not the localhost.yyyy-mm-dd.log). Logging seems to work fine for my application except that some stack traces do not show up in app.log and instead show up in the localhost.yyyy-mm-dd.log. For example, my application was missing commons-validators classes and this stack trace did not show in app.log.
I'm not sure how to get these stack traces to show up in my app.log? My log4j.properties file is here:
### Root Level ###
log4j.rootLogger=WARN, LOGFILE
### Application Level ###
log4j.logger.com.ccn=TRACE
### Spring ###
log4j.logger.org.springframework.core=INFO
log4j.logger.org.springframework.beans=INFO
log4j.logger.org.springframework.context=INFO
log4j.logger.org.springframework.web=INFO
### Configuration for the LOGFILE appender ###
log4j.appender.LOGFILE=org.apache.log4j.RollingFileAppender
log4j.appender.LOGFILE.MaxFileSize=5MB
log4j.appender.LOGFILE.MaxBackupIndex=10
log4j.appender.LOGFILE.File=$\{catalina.home\}/logs/app.log
log4j.appender.LOGFILE.Append=true
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=[%p %d %t] %c [%C{1}.%M(): "%m"]%n