tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gulcu <>
Subject RE: Rollover for each day ? Is this possible ??
Date Fri, 19 Jan 2001 11:24:40 GMT


Ooops! I got a DateRollingAppender from you too? Eirik Lygre has also sent 
me one. Roberto Leong has too. Their contributions are attached.
Jim, can you please repost your contribution on this list? I seem to have 
lost it. Sorry, I haven't been handling this item particularly well.

What I would like to see is the following:

0) Keep in mind that log4j is not in the quickie business. Much of the 
success of the package can be attributed to solving problems well, not just 
solving them.

1) The new appender should have flexible way of expressing the rollover 
frequency, perhaps in the same format as in the Unix crontabs file which I 
belive is also a Posix standard. I am not aware of any library that 
supports this. JDring ( seems to have most 
of the functionality needed except parsing the crontab format. Anyone know 
anything better?

As a side note, the omission of a crontab/at functionality in Java core 
libraries seems like a major oversight. Try buying stock a day later then 
what the customer ordered. See how many customers stay with your brokerage 
house.  :-)

2) The new appender should not add any significant overhead to the append 
method. If appending to a file takes 100 microseconds in a particular 
environment it should still take 100 microseconds with the new appender.

There are several possible designs. The first one is to check for the 
rollover condition at each append. This is what Eirik Lygre has done. The 
second one is to schedule a thread that will initiate the rollover after 
the appropriate delay. This is what Roberto Leong has proposed.

The second approach seems more sound to me. One could generalize it by 
using a single timer  thread (as in JDring) to manage multiple time based 
RollingAppenders. Your opinion/comments are welcome. Ceki

ps: I am forwarding this to the Avalon list since they are writing a 
general purpose framework.
ps: I wonder how Tomcat addresses the issue.

At 21:45 18.01.2001 -0500, you wrote:
>Yes, but you need to use a different Appender than FileRolloverAppender.
>I've already written one, but haven't heard back from Ceki about adding it
>to the "package" yet...
>-Jim Moore
>-----Original Message-----
>From: Andrewt Tierney []
>Sent: Thursday, January 18, 2001 8:02 PM
>To: ''
>Subject: Rollover for each day ? Is this possible ??
>I see you can set the maxsize and have it automatically rollover the log
>Is it possible to force a new log file each day ????
>To unsubscribe, e-mail:
>For additional commands, e-mail:

Freedom as in the capacity to exercise choice.
View raw message