yueki1993 commented on code in PR #924:
URL: https://github.com/apache/logging-log4j2/pull/924#discussion_r894992070
##########
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:
OK, I won't add warning log in Log4j2 factory too because if someone
misconfigures LogLevelRangeFilter, no logs will be output - they should be able
to notice misconfiguration easily.
--
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]