Problems with the rolling over behaviour occur mostly if more than one Appender write to the same file, e.g. out from different JVM's (since the file system cannot rename it if the other Appender still holds a handle on the file). Heri
-----Ursprüngliche Nachricht----- Von: Roberto Simoni [mailto:[email protected]] Gesendet: Freitag, 10. Juli 2009 11:38 An: [email protected] Betreff: [SPAM (Bayesain Analysis)] - DailyRollingFileAppender & RollingFileAppender after a rollover continues to write on previous file... - Bayesian Filter detected spam Hi to all. We use log4j in a big project for our customer on a linux/unix system (JBoss 4, JDK 1.5). Every day, I see current time logs present in two log file... the current (<application_name>.log) and the previous log (<application_name>.log.<date_pattern> or <application_name>.log.<counter>) as the rollover operation hasn't stopped to write to the previous file. We have only a log4j.xml file and a file appender configured. What I see is that when the problem occurs a lot of logs is in writing in that moment. We have a batch operation at midnight, so with DailyRollingFileAppender the problem occurs everyday, instead with RollingFileAppender the problem occurs only if the rollover is made around midnight. I have seen that rollover operation is *not* synchronized due to a "already synchronization on doAppend method" (as sad in RollingFileAppender class). Are you confident on this behaviour? Thanks in advance Bye --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
