You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by Curt Arnold <ca...@apache.org> on 2005/07/20 17:27:22 UTC
Re: How Asynchronous Appennder works ?
On Jul 20, 2005, at 9:03 AM, Jayant Dusane wrote:
> Hi curt
> i m using the log4cxx-0.9.7 , I hav one doubt , If suppose i
> create two logger in my xml file one Asynchonous Appender for
> that ,So Asynchonous Appender buffer is one for whole application ,
> or buffer per logger ? .I checked that only one Dispature thread is
> started , And Dispature is a member of asynchonous class ie only
> one instance of asynchonous appender is created , So please expain
> this.
>
> Regards
> Jayant Dusane
> Starent Networks India Pvt. Ltd
> Walla! Mail - get your free 3G mail today
There is only one buffer per appender. When an logging event is
added to an async appender, the logging thread only needs to be
blocked for the time that is needed to add the message to the
buffer. If the buffer is not full, this should be substantially
shorter than the time that the thread would be blocked if a
synchronous were used. If the buffer is full, the logging thread
will be blocked until the dispatching thread has opened up some space
in the buffer.