logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Reed" <john.r...@perfconn.demon.co.uk>
Subject RE: DailyRollingFileAppender does not rollover when expected to
Date Sat, 02 Feb 2002 07:36:00 GMT
My solution was to use a static thread that logged something just after
midnight.

-----Original Message-----
From: David Sanders [mailto:dsanders@chaincast.com]
Sent: 02 February 2002 00:28
To: 'log4j-dev@jakarta.apache.org'
Subject: DailyRollingFileAppender does not rollover when expected to


http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/DailyRollingFileAp
pender.html says:

"For example, if the File option is set to /foo/bar.log and the DatePattern
set to '.'yyyy-MM-dd, on 2001-02-16 at midnight, the logging file /foo/
bar.log will be copied to /foo/bar.log.2001-02-16 and logging for 2001-02-17
will continue in /foo/bar.log until it rolls over the next day"


I don't mean to be picky, but the above statement isn't accurate.  The file
is rolled upon the first log attempt AFTER midnight.  In my application,
there may be no logging between midnight and 5:00 AM.  Yet, I need the files
to be closed and renamed at midnight so a tool can grab them and do billing
based on sessions in the log.

Version 1.15 of DailyRollingFileAppender fixed the "restart" problem, but
did not fix the problem described above.

DailyRollingFileAppender and DatedFileAppender have the same problem, i.e.,
they roll when first log attempt is made after midnight.




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


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


Mime
View raw message