Hi, I have a Logging utility class which wraps the log4j API and allows simple logging. It programmatically sets a DailyRollingFileAppender, and it's always worked without a hitch for me.
Now, I'm integrating into an existing tomcat webapp. Using my class, the log files are not rolling, but just continue to build up in the same file. I have noticed a properties file in the WEB-INF directory called log.properties, which contains the usual Log4j configuration. This file specifies a RollingFileAppender set to roll at 10Mb. Is there a chance that my class, when run under tomcat, is picking up this config file by default?
If so, can I stop it doing that? If not, what else could be causing my log files not to roll?
Some buddy once told me that the DailyRollingFileAppender will only roll if Log4j is active at midnight, so the server has to be running constantly. I never checked that, but you might test that as well by resetting your local computer time (if it's possible to test your application locally).