-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
configurationAffects the configuration system in a general wayAffects the configuration system in a general wayenhancementAdditions or updates to featuresAdditions or updates to features
Description
Description
PR #2941 introduces some basic logging of the most important Configuration
lifecycle events at an INFO
level. The messages are meant to convey:
- which configuration file is used.
- the last modification timestamp of the file to distinguish between two revisions of the same file.
Unfortunately this information only appears in XmlConfiguration
:
Lines 340 to 343 in 86781fd
public String toString() { | |
return getClass().getSimpleName() + "[location=" + getConfigurationSource() + ", lastModified=" | |
+ Instant.ofEpochMilli(getConfigurationSource().getLastModified()) + "]"; | |
} |
JsonConfiguration
only prints the name of the configuration file, while PropertiesConfiguration
does not have a toString()
method at all:
2025-04-04T19:10:16.058147325Z pool-10-thread-1 INFO Stopping configuration org.apache.logging.log4j.core.config.properties.PropertiesConfiguration@18765d9b...
2025-04-04T19:10:16.058147313Z pool-9-thread-1 INFO Stopping configuration org.apache.logging.log4j.core.config.properties.PropertiesConfiguration@18f5f66d...
2025-04-04T19:10:16.058631896Z pool-10-thread-1 INFO Configuration org.apache.logging.log4j.core.config.properties.PropertiesConfiguration@18765d9b stopped.
2025-04-04T19:10:16.058880638Z pool-9-thread-1 INFO Configuration org.apache.logging.log4j.core.config.properties.PropertiesConfiguration@18f5f66d stopped.
We probably should add the toString()
method to AbstractConfiguration
and remove it from its derived classes.
DomGarguilo, ctubbsii and vy
Metadata
Metadata
Assignees
Labels
configurationAffects the configuration system in a general wayAffects the configuration system in a general wayenhancementAdditions or updates to featuresAdditions or updates to features
Type
Projects
Status
To triage