ppkarwasz commented on code in PR #924:
URL: https://github.com/apache/logging-log4j2/pull/924#discussion_r894787786
##########
log4j-1.2-api/src/main/java/org/apache/log4j/builders/filter/LevelRangeFilterBuilder.java:
##########
@@ -83,19 +86,23 @@ public Filter parse(PropertiesConfiguration config) {
}
private Filter createFilter(String levelMax, String levelMin, boolean
acceptOnMatch) {
- Level max = Level.FATAL;
- Level min = Level.TRACE;
+ Level max = Level.OFF;
+ Level min = Level.ALL;
if (levelMax != null) {
- max = OptionConverter.toLevel(levelMax,
org.apache.log4j.Level.FATAL).getVersion2Level();
+ max = OptionConverter.toLevel(levelMax,
org.apache.log4j.Level.OFF).getVersion2Level();
}
if (levelMin != null) {
- min = OptionConverter.toLevel(levelMin,
org.apache.log4j.Level.DEBUG).getVersion2Level();
+ min = OptionConverter.toLevel(levelMin,
org.apache.log4j.Level.ALL).getVersion2Level();
}
org.apache.logging.log4j.core.Filter.Result onMatch = acceptOnMatch
? org.apache.logging.log4j.core.Filter.Result.ACCEPT
: org.apache.logging.log4j.core.Filter.Result.NEUTRAL;
Review Comment:
There was no warning in Log4j 1.x, so I wouldn't add it here. You can add a
warning in the Log4j2 factory `LevelRangeFilter#createFilter` (using the
`StatusLogger`).
--
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]