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 Alan Simpson <si...@hotmail.com> on 2002/06/21 18:44:57 UTC

bug with AsyncAppender.close()?

hi,

I have an Appender class attached to an AsyncAppender. I try to close the 
attached appender by calling close() on the AsyncAppender object.

However, this does not work. Looking at the AsyncAppender source code, it 
doesn't look as though it calls close() on the attached appenders.

I can close the attached appender by calling
AsyncAppender.removeAllAppenders(), but the problem with this is that the 
close() is then executed in the main thread, not in a separate thread.

Is this a bug in the AsyncAppender code (I find this hard to believe)?

Is there a design reason for this behaviour of AsyncAppender.close()?

In any case, is there a way to get my appender to close in a separate
thread?

thanks for your help,

Alan


_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: bug with AsyncAppender.close()?

Posted by Ceki Gülcü <ce...@qos.ch>.
Alan,

I replied to your enquiry as late as yesterday.

At 16:44 21.06.2002 +0000, Alan Simpson wrote:
>hi,
>
>I have an Appender class attached to an AsyncAppender. I try to close the 
>attached appender by calling close() on the AsyncAppender object.
>
>However, this does not work. Looking at the AsyncAppender source code, it 
>doesn't look as though it calls close() on the attached appenders.
>
>I can close the attached appender by calling
>AsyncAppender.removeAllAppenders(), but the problem with this is that the 
>close() is then executed in the main thread, not in a separate thread.
>
>Is this a bug in the AsyncAppender code (I find this hard to believe)?
>
>Is there a design reason for this behaviour of AsyncAppender.close()?
>
>In any case, is there a way to get my appender to close in a separate
>thread?
>
>thanks for your help,
>
>Alan

--
Ceki


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>