Bug 37736 - LoggerEventListener's appenderRemovedEvent() and levelChangedEvent() methods are never called
Summary: LoggerEventListener's appenderRemovedEvent() and levelChangedEvent() methods ...
Status: RESOLVED FIXED
Alias: None
Product: Log4j - Now in Jira
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.3alpha
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: log4j-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-01 15:13 UTC by Jess Holle
Modified: 2007-08-22 18:56 UTC (History)
1 user (show)



Attachments
Proposed patch (1.37 KB, patch)
2005-12-01 15:13 UTC, Jess Holle
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jess Holle 2005-12-01 15:13:42 UTC
Despite registering a LoggerEventListener with a LoggerRepository/Hierarchy, the
appenderRemovedEvent() and levelChangedEvent() methods are never called.  This
is very frustrating and misleading.  [log4j 1.2 has the same issue with its
equivalent listener and event for appender removal...]

In log4j 1.3 at least this is due purely to the lack of a few lines of code in
Category to call the approach "fire" methods on Hierarchy.

I am attaching a patch which adds the necessary calls.
Comment 1 Jess Holle 2005-12-01 15:13:59 UTC
Created attachment 17103 [details]
Proposed patch
Comment 2 Curt Arnold 2007-08-22 18:56:35 UTC
Fixed in log4j 1.2 in rev 568802.  Repository must either be an instance of Hierarchy or implement 
HierarchyEventListener.