ctubbsii commented on issue #3100: URL: https://github.com/apache/logging-log4j2/issues/3100#issuecomment-2814552887
> > I don't know if I have a good argument for keeping them at DEBUG, or if it's just a resistance to change, but I know that 2.24.3 is too noisy at INFO, and 2.24.0 was just right. > > Probably there is a little of both. I do like big lifecycle events at INFO, I think... as long as it's not too noisy. Really, I think I just want to know that 1. Which configuration actually got used after everything is loaded (I expect exactly 1 message at the start of any application) 2. Any changes (I expect 0 messages unless I explicitly make a change to my file and I have a monitorInterval configured) > > > The idea of having configuration "started" or "stopped" is meaningless to me. > > I see your point, probably two start/stop events might be omitted: > > * When the `DefaultConfiguration` is replaced with a user configuration at the start of the application. > * When the user configuration is replaced with a `NullConfiguration` at shutdown. Or just move them to DEBUG or TRACE. They don't have to go away entirely. If they aren't something set from the environment/config, and just internal lifecycle stuff, then it's probably not something most users care about, but could still be useful for troubleshooting. > > I think that events, where a user configuration is replaced with another user configuration are interesting. For example Spring Boot applications use `log4j2.xml` initially and switch to `log4j2-spring.xml` shortly after. > That's weird. If the application is changing logging at runtime inside the app, I think it deserves whatever extra logging that they triggered. If it's noisy, it's their own fault for being weird :smiley_cat: > Maybe we should only log the start and stop of a configuration, if the user (or some external library) provides the location of the configuration file on the command line, instead of relying on the defaults? "starting" and "stopping" seem to me like internal lifecycle events. As a user, I want to see my effective configuration from the environment (even if I didn't configure it explicitly, but it was picked up from the CLASSPATH), and when the effective configuration changes. For example, imagine an app starts at 10:00, the user adds an includeOptional directive to point to a file that already exists at 10:29:40, the change is observed at 10:30, then the user edits the second file at 10:31:05, and the change is noticed 25 seconds later. Then, the user makes two more edits to the main file at 11:28 and 12:45:30 before the app exits. The only things that would be logged at INFO from the status logger would be something like: ``` <START OF APP> INFO 10:00:00 Using log4j configuration file found at /path/to/log4j2.properties (monitorInterval = 30s) INFO 10:30:00 Log4j configuration reloaded from file change event for /path/to/log4j2.properties INFO 10:31:30 Log4j configuration reloaded from file change event for /path/to/log4j2-includeOptional-file.properties INFO 11:28:00 Log4j configuration reloaded from file change event for /path/to/log4j2.properties INFO 12:45:30 Log4j configuration reloaded from file change event for /path/to/log4j2.properties <APP EXITS> ``` If the user didn't edit the files at all, only the first line would have appeared, and nothing else. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org