You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Anuj Agrawal <ag...@yahoo.com> on 2003/02/05 15:19:27 UTC

AsyncAppender assistance

Hi All -

Here's what i'm wanting to do:

I need to setup a logger that would send messages to an MQ Queue (which
has been setup to receive messages onto the queue synchronously; i
believe it can be setup to receive messages asynchronously, but that's
not an option for me).  So to avoid the system slowing down cause the
logging is waiting to put the message on the queue, i'm considering
setting up a memory buffer where the logs can be written to, and have a
separate thread pull the log messages off that buffer and into the
queue.  The buffer would also have a max size, which when reached would
spit out the logs in the buffer to a file(s).  This file(s) would then
subsequently be read in by that separate thread at a later time (yes,
the order of the logs are not important for me).

Given the above scenario, it looks like i ought to be using the
AsyncAppender, but i'm not sure how to go about handling the 'dump to
file' bit.. in the documentation, it says that this appender uses a
bounded buffer, but what happens when the buffer is full?

Thanks for any help.
Anuj.

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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