ppkarwasz commented on a change in pull request #764:
URL: https://github.com/apache/logging-log4j2/pull/764#discussion_r810680613
##########
File path:
log4j-1.2-api/src/main/java/org/apache/log4j/config/Log4j1ConfigurationParser.java
##########
@@ -103,6 +107,18 @@
if (Boolean.parseBoolean(debugValue)) {
builder.setStatusLevel(Level.DEBUG);
}
+ // if log4j.reset=true then reset hierarchy
+ final String reset = getLog4jValue("reset");
+ if (reset != null && OptionConverter.toBoolean(reset, false)) {
Review comment:
Looking at the Log4j 1.2 code, neither `Log4j1ConfigurationParser` nor
any `Configuration` class should check the _"log4j.reset"_ key. This should be
done in `PropertyConfigurator#configure` to decide whether to replace the old
configuration or to make a `CompositeConfiguration` out of them.
Looking at [this SO question](https://stackoverflow.com/q/71087714/11748454)
I have the impression that calling `PropertyConfigurator#configure` multiple
times without resetting the old config, was a common practice.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]