logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen <glenl...@model3.net>
Subject Re: best practice for "actively" triggering future events
Date Mon, 09 May 2005 21:39:36 GMT

Rolling over files is the major use case.


Curt Arnold wrote:
> One use case for this would be to force roll-over of files at particular 
> times.  However, if that is the only use case there might be simpler 
> approach within the RFA framework.
> 
> Could you elaborate on other use cases that you are wanting to support?
> 
> 
> On May 6, 2005, at 2:32 PM, Glen wrote:
> 
>> Hi All,
>> I have run into the following scenario many times.  That is how to 
>> trigger a future event that you want to happen at a specific time.  I 
>> have noticed that the general practice is a passive approach,  Wait 
>> for a log event to happen and check if you are passed the specific time.
>>
>> I am looking for people's thoughts/pointers on a more active approach.
>>
>> The passive approach works for me and I often turn this into an active 
>> approach by logging a NOOP logging event that all the appender's know 
>> not to log.  This works great but has the obvious drawback of needing 
>> the appender's to know about this in advance.  Just wondering people's 
>> thoughts on a more robust generic solution.
>>
>> Could be something as simple as log4j keeping a single java.util.Timer 
>> that appenders can register callbacks with.
>>
>> cheers,
>> Glen
>>
>> PS I thought I saw an example of this in the log4j contribs or src a 
>> few months but can't find it now...
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org


---------------------------------------------------------------------
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