logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Muller" <...@online.no>
Subject RE: Forcing a DailyRollingFileAppender to rollover at midnight
Date Thu, 05 Dec 2002 16:02:11 GMT
| Is there a way to
| do that (other than forcing a dummy log call at midnight...)?

That's a good question and obviously a very valid requirement. The problem
is that the rollover mechanism is conducted in the same thread is the actual
logging (unless some sort of async logging is enforced), hence to force
logging at a certain moment in time you must issue a log statement at that
time. I believe that the clever log4j programmers will come up with extended
and more flexible rollover mechanisms in future versions (I think this is
planned for the next version, anyone?).

In the meantime, issuing a dummy log call at midnight is not all that bad.
Use a Timer that kicks off a task that does this job in a generic manner.

Please inform this group if you come up with a better solution.

--

Thomas




















*************************************************************************
Copyright ERA Technology Ltd. 2002. (www.era.co.uk). All rights reserved. 
The information supplied in this Commercial Communication should be treated
in confidence.
No liability whatsoever is accepted for any loss or damage 
suffered as a result of accessing this message or any attachments.

________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com
________________________________________________________________________

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


Mime
View raw message