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

LoggerContext fires 2 PropertyChangeEvent with 'propertyName' set to 'config' on a single reconfigure #3546

Open
JWT007 opened this issue Mar 17, 2025 · 0 comments

Comments

@JWT007
Copy link
Contributor

JWT007 commented Mar 17, 2025

The LoggerContext fires two PropertyChangeEvents of type LoggerContext.PROPERTY_CONFIG on a reconfigure.

A single reconfigure creates events in the following order:

The first one the oldValue == newValue because it is called during updateLogggers

java.beans.PropertyChangeEvent:
propertyName=config; 
oldValue=com.tsystems.pwc.config.logging.log4j.api.config.DefinedCompositeConfiguration@7470563a
newValue=com.tsystems.pwc.config.logging.log4j.api.config.DefinedCompositeConfiguration@7470563a 

The second one comes when the reconfiguration completes and is for the actual configuration change

java.beans.PropertyChangeEvent:
propertyName=config; 
oldValue=com.tsystems.pwc.config.logging.log4j.api.config.DefinedCompositeConfiguration@3b99e345
newValue=com.tsystems.pwc.config.logging.log4j.api.config.DefinedCompositeConfiguration@7470563a

I am wondering if the updateLoggers PropertyChangeEvent should use a different property-name.

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

1 participant