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 Mariano Gonzalez <ma...@gmail.com> on 2014/08/22 19:56:20 UTC

What's the AsyncLoggerConfig thread?

Hello,

Could you explain what's the purpose of this thread? It seems to keep on
running when my application is undeployed.

I looked at the code and it seems to be a thread responsible for
dispatching events to Disruptor, but if that's the case then the name may
not be very descriptive IMHO. Can you confirm what's the purpose of this
thread and that it should stop after the logging context receives the
stop() message?

Thanks!

Re: What's the AsyncLoggerConfig thread?

Posted by Remko Popma <re...@gmail.com>.
This is the background thread that takes log events out of the disruptor ringbuffer and passes them to their appender(s). So this is where the actual logging (to disk for example) takes place. This is a daemon thread so it should not keep your app alive longer than necessary. 

A call to asynccontext.stop() will ensure the ringbuffer contents are fully processed before returning. 

Sent from my iPhone

> On 2014/08/22, at 19:56, Mariano Gonzalez <ma...@gmail.com> wrote:
> 
> Hello,
> 
> Could you explain what's the purpose of this thread? It seems to keep on
> running when my application is undeployed.
> 
> I looked at the code and it seems to be a thread responsible for
> dispatching events to Disruptor, but if that's the case then the name may
> not be very descriptive IMHO. Can you confirm what's the purpose of this
> thread and that it should stop after the logging context receives the
> stop() message?
> 
> Thanks!

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