Bug 10185 - AsyncAppender.close() does not call close() on attached appenders
AsyncAppender.close() does not call close() on attached appenders
Status: RESOLVED FIXED
Product: Log4j
Classification: Unclassified
Component: Appender
1.2
Other other
: P3 normal
: ---
Assigned To: log4j-dev
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2002-06-24 17:23 UTC by Paul Voutier
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Voutier 2002-06-24 17:23:19 UTC
I sent a message to the log4j-dev mailing list, which Ceki replied to.

Here is his reply:

"You are correct to observe that AsyncAppender.close does not close 
embedded appenders. The rationale behind this behavior is that embedded
appenders might be attached somewhere else, so closing them when
AsyncAppender is closed would be somewhat heavy handed and possibly
incorrect.

This "foresightful" reasoning is doubtful because attaching the same
appender to more than one logger is often problematic and consequently
discouraged. It would much simpler if AsyncAppender.close also closed
embedded appenders.  I would appreciate if you could enter a
bug report so that the problem is not forgotten. (I admit its a
problem.)"
Comment 1 Paul Voutier 2002-06-24 17:25:12 UTC
I wrote to the log4j-dev mailingn list the other day and received the following 
reply back from Ceki:

"You are correct to observe that AsyncAppender.close does not close 
embedded appenders. The rationale behind this behavior is that embedded
appenders might be attached somewhere else, so closing them when
AsyncAppender is closed would be somewhat heavy handed and possibly
incorrect.

This "foresightful" reasoning is doubtful because attaching the same
appender to more than one logger is often problematic and consequently
discouraged. It would much simpler if AsyncAppender.close also closed
embedded appenders.  I would appreciate if you could enter a
bug report so that the problem is not forgotten. (I admit its a
problem.)"
Comment 2 Ceki Gulcu 2002-07-05 10:41:50 UTC
Paul,
Thank you for filing a bug report. Fixed in log4j 1.2.5.