Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to remove a HierarchyEventListener? #233

Closed
TroudhuK opened this issue Jul 17, 2023 · 2 comments
Closed

Ability to remove a HierarchyEventListener? #233

TroudhuK opened this issue Jul 17, 2023 · 2 comments

Comments

@TroudhuK
Copy link

Hierarchy::addHierarchyEventListener allows to register a listener to intercept the appenders additions to a logger.
But there is no way to remove a listener, for example because its lifetime isn't the same as the logger (when we do it to Logger::getRootLogger()->getLoggerRepository()). True, or do I miss something?

If true, I'd like to have a Hierarchy::removeHierarchyEventListener.

@rm5248
Copy link
Contributor

rm5248 commented Jul 17, 2023

It looks like this was never added, since it is not part of the Log4j1 API. It seems reasonable to add though.

rm5248 added a commit that referenced this issue Jul 17, 2023
rm5248 added a commit that referenced this issue Jul 28, 2023
* Add a way to remove the HierarchyEventListener

See #233
@rm5248
Copy link
Contributor

rm5248 commented Jul 28, 2023

fixed in #234

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants