https://issues.apache.org/bugzilla/show_bug.cgi?id=45231
--- Comment #2 from David Berkman <[EMAIL PROTECTED]> 2008-07-03 14:32:48 PST --- (In reply to comment #1) > Please attach a testcase demonstrating the behaviour you are reporting. > You've got to be kidding. It's directly in your code. Here's the stack trace... at org.apache.log4j.helpers.AppenderAttachableImpl.removeAllAppenders(AppenderAttachableImpl.java:141) at org.apache.log4j.Category.removeAllAppenders(Category.java:891) Calling Category.removeAllAppenders() results in a call to AppenderAttachableImpl.removeAllAppenders(), probably because this is set as the default listener for the remove event internally. Looking at the code fro the removeAllAppenders method in AppenderAttachableImpl, we see... public void removeAllAppenders() { if(appenderList != null) { int len = appenderList.size(); for(int i = 0; i < len; i++) { Appender a = (Appender) appenderList.elementAt(i); a.close(); } appenderList.removeAllElements(); appenderList = null; } } Look at that a.close(). Why is this method calling close on an Appender simply because it has been removed from a logger? Appenders are shared objects. I wonder how the other loggers that Appender is attached to will feel about it being closed underneath them? What happens when I re-use this Appender? In my opinion this is incorrect behavior. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]