You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2003/08/18 15:48:30 UTC
DO NOT REPLY [Bug 21499] -
DailyRollingFileAppender not rolled (if necessary) on shutdown
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