-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Issue 1501: increase default StatusLogger level to warn #1592
base: 2.x
Are you sure you want to change the base?
Issue 1501: increase default StatusLogger level to warn #1592
Conversation
It's method getDefaultStatus() is initially used, when configuring StatusConfiguration from found config file. Status doesn't change if file misses status key node.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except the remarks below, it looks good to me.
Since this is a breaking change, I posted a thread on dev
to check for consensus.
log4j-api/src/main/java/org/apache/logging/log4j/status/StatusLogger.java
Outdated
Show resolved
Hide resolved
log4j-core/src/main/java/org/apache/logging/log4j/core/config/AbstractConfiguration.java
Outdated
Show resolved
Hide resolved
log4j-core/src/main/java/org/apache/logging/log4j/core/config/status/StatusConfiguration.java
Outdated
Show resolved
Hide resolved
I am not in favor of this. We should fix the original problem that a JSON or YAML configuration is found but dependencies are missing to log at error instead. |
Looking at the thread on dev, I believe majority did not like the idea of changing default StatusLogger level, so changes reverted and error logged as suggested (JSON/YAML ConfigurationFactory is not active and found corresponding config file). |
Sorry for the delayed answer. Your PR looks good to me, if the default status logger level of Personally I don't agree that |
…`ConfigurationFactory`s (#1592) Co-authored-by: Łukasz Spyra (@lukaszspyra)
@lukaszspyra, I am sorry for the delay. There were more pressing issues. As a part of our ongoing effort to clean up the Once the default level is set to |
Fix of #1501.
ERROR
toWARN
(used when no config active);ERROR
toWARN
(used as default value). It's method withStatus(String status) modified to default toWARN
(used whenstatus
string value found in config file is invalid);getDefaultStatus()
modified to default toWARN
, as it is called in a.o. JsonConfiguration and does not change if there is nostatus
key in config file.