logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 21499] - DailyRollingFileAppender not rolled (if necessary) on shutdown
Date Mon, 18 Aug 2003 13:48:30 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21499>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21499

DailyRollingFileAppender not rolled (if necessary) on shutdown

ceki@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED



------- Additional Comments From ceki@apache.org  2003-08-18 13:48 -------

Rollover for period 'n' occurs at the arrival of the first message during any 
subsequent period (n+1 or n+2, ...). 

If one calls LogManger.shutdown() during period 'n' that is not a reason for 
rollover. 

1) Unless I am mistaken, the type of layout being used should have no influence 
on rollover. 

2) The rollOver algorithm is known to be correct. 

Thus, I have trouble understanding the following paragraphs:

<quote>
When log4j initializes for a DailyRollingFileAppender, activateOptions() 
resets:
  scheduledFilename = fileName+sdf.format(new Date(file.lastModified()));

The file is modified (closed) when the ServletContextListener.contextDestroyed()
calls LogManager.shutdown(), the current time is used to set the 
scheduledFilename (on the restart), and when the scheduled rollOver() occurs, 
it senses that the new file is the same as the previous, and silently returns.
</quote>

Is it possible that the log file is modified between periods n and n+1 without
being logged to?

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


Mime
View raw message