logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roberto Simoni <roberto.sim...@yahoo.it>
Subject DailyRollingFileAppender & RollingFileAppender after a rollover continues to write on previous file...
Date Fri, 10 Jul 2009 09:37:30 GMT
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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message