Hi all, I have an AsyncAppender appended to the root category.
I have a shutdown thread (registered using Runtime.addShutdownHook) that must be run when my program exits. In this thread, I log some traces. As I am in a shutdown process, I don't want the AsyncAppender to be operational in the shutdown hook (so that I don't have to wait the AsyncAppender to dump all the events it has buffered). I tried to remove the appender by calling Category.getRoot().removeAppender(myAsyncAppender) and then call myAsyncAppender.close(). But I does not seem to work, as I see the following error: log4j:ERROR Attempted to append to closed appender named [null]. This surprised me, as I explicitly removed the AsyncAppender. Does anyone known where I was wrong, and how to overcome the problem ??? Thanks & Regards, J-F Daune -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>