logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <c...@qos.ch>
Subject Re: circular buffering
Date Wed, 07 Aug 2002 07:20:28 GMT
Have you seen SMTPAppender? It is based on a circular buffer.

At 23:34 06.08.2002 -0400, you wrote:
>I need a circular buffered appender -- one that tracks the last N messages 
>so when something goes wrong I can dump out those.  The idea is that the 
>circular buffer can take debug-level messages, but you don't see them 
>until there is a problem, when only the N most recent ones are likely to 
>be valuable.
>
>Has anyone already done this?  I've started to code this up, and run in to 
>the interesting problem of how to get my hands on these appenders to flush 
>them when that's needed.  (I'm assuming here that they are created from 
>configuration, not explicitly in code.)  The best I can figure out is a 
>static call that is given one logger, and then scrounges through the tree 
>finding and flushing these buffering appenders.  (I'm walking up the tree 
>from the logger looking for appenders until either I hit the top or 
>something that isn't additive; then  because I can't figure out how to 
>walk down the three I'm looking through all the loggers for those that are 
>descended from the specified logger without an intervening non-additive 
>logger.  This means that flushing from the root gets all loggers not 
>blocked by non-additives, for example.)
>
>Any thoughts are welcome.  I will obviously post the thing when I'm done 
>in case anyone else wants it.
>
>                 Ken

--
Ceki


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