You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Elijah Baley <e_...@hotmail.com> on 2005/08/29 08:59:41 UTC

Q: useful (IMO) AsyncAppender derived class

The existing AsyncAppender implementation currently waits forever for free 
space to become available in the internal messages FIFO. From the source 
code I see that it seems rather straightforward to implement an 
AsyncAppender derived class that provides the following extra behavior:

    - wait with timeout for FIFO space to become available (timeout to be 
set via "setFIFOWaitTimeout(long msec)"). If FIFO space does not become 
available then message is discarded (and an internal counter is "++"-d - 
available via "getDiscardedCount()", and/or call the error handler).

    - if timeout set to NEGATIVE value then == INFINITE
    - if timeout set to zero then == discard immediately if FIFO full (no 
wait)
    - otherwise (i.e., POSITIVE) then == wait specified timeout and then 
check again...

I was wondering if anyone implemented something along these lines, and woul 
very much appreciate if such a class were included in some future release

Thanks. 

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