logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: Contribution of TimedDailyRollingFileAppender or CronExpressionFileAppender
Date Wed, 20 Feb 2008 15:52:48 GMT

On Feb 20, 2008, at 4:14 AM, Stefan Fleiter wrote:

> Hello Curt,
>
> [Offer to provide TimedDailyRollingFileAppender or  
> CronExpressionFileAppender]
> Thanks a lot for your answers and four your Pointing to the  
> companions.
>
> I do not think that this is the right place for such a  
> functionality, though.
> I have searched the archives and found *quite a lot* questions for a
> DailyRollingFileAppender which does rollover daily (as the name  
> suggests)
> and not only after the first log statement. I have added some links  
> at the end
> of this message [1].

Having something in the extras companion should actually make the  
feature available to more people since many people are locked into  
substantially older versions of log4j for various reasons.  If  
something is in the extras, it can be a lot easier get an extra jar  
added to the class path than to force an log4j upgrade.

>
>
>> I think it would be better to avoid adding a dependency to pick up  
>> the CronExpression since that would likely force the Policy off  
>> into a yet another companion since we would not want to force  
>> everyone who uses extras to pick up quartz.
> The CronExpressionFileAppender is probably more difficult to get in.
> Since I would prefer a solution added to log4j itself (if possible) I
> will concentrate on the other option.
>
>> I guess you could provide a SimpleDateFormat pattern and matching  
>> value string that could be used for the trigger whenever it went  
>> over.
>
> We want to guarantee that log rotation (rollover) does occur at the  
> specified time even
> if no log statement is appended, therefore our code uses the Java  
> Timer/TimerTask facility.
> This is Java 1.3. Could this be a problem for incorporation?
>

Are you thinking about trying to manufacture an event to force through  
the processing pipeline?  If I were thinking about that then I would  
dust off the dormant MultiFileAppender effort which would be better  
able to handle rollovers that are externally forced.  Search the  
archives for "MultiFile" for the back-story.  Been a while since I  
worked on it and I don't recall what state the code was left in.


>> also want to have some logic to prevent erroneous multiple  
>> rollovers if the timestamps were out of sequence (can occur in  
>> multi-threaded apps).
> Thanks for the hint, I will think about this.
>
>
> [1] List:
> http://marc.info/?l=log4j-user&m=115315336421856&w=2
> http://marc.info/?l=log4j-user&m=106520773706709&w=2
> http://marc.info/?l=log4j-user&m=103910376123465&w=2
> http://marc.info/?l=log4j-user&m=100342542116466&w=2
> http://marc.info/?l=log4j-user&m=116411356628222&w=2
> http://marc.info/?l=log4j-user&m=114537247822135&w=2
> http://marc.info/?l=log4j-user&m=114120046200928&w=2
> http://marc.info/?l=log4j-user&m=103596803411306&w=2
> http://marc.info/?l=log4j-user&m=103529410624402&w=2
> http://marc.info/?l=log4j-user&m=100342542116466&w=2
>
> Greetings,
> Stefan Fleiter




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


Mime
View raw message