Bug 10185 - AsyncAppender.close() does not call close() on attached appenders
Summary: AsyncAppender.close() does not call close() on attached appenders
Status: RESOLVED FIXED
Alias: None
Product: Log4j - Now in Jira
Classification: Unclassified
Component: Appender (show other bugs)
Version: 1.2
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: log4j-dev
URL:
Keywords:
Depends on:
Blocks:
 
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.