You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by la...@marchex.com on 2005/09/07 23:45:49 UTC

DailyRollingFileAppender writing to previous day's log

Hi,

I am using log4j-1.2.8.  Some background information:   I have 3 web applications (.war) running under the same tomcat instance.   All 3 of these web applications write to the same log file.    

After midnight, a new log file is created, however, something strange happens.  One of the web apps (I believe it depends on which app writes to the log first), continues to write to the old log.   In fact, it completely overwrites the old log and begins to log for the current day.   For that reason, in myapp.log.2005.09.05 I will only see logging information for that app from 09.06, etc, etc.  

The only way to fix this problem is to reset tomcat.   After that point, all the apps will write to the correct file.   This is not a feasible production solution, especially since the old logs get overwritten.

The reason we can not split the 3 web applications into 3 seperate logs is because of shared code (aka the Model Layer), and we can only configure the logs based on package name.   Therefore all 3 app's model layer will continue to hit the same log (resulting in the same problem).

Any help or suggestions would be appreciated!

Thanks.

-L


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org