Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
LevelRangeFilterBuilder enables us to use log4j2's LevelRangeFilter with log4j1's configuration file.
The class
- has obvious bug here: https://github.com/apache/logging-log4j2/blob/rel/2.17.2/log4j-1.2-api/src/main/java/org/apache/log4j/builders/filter/LevelRangeFilterBuilder.java#L65
- log4j1's and log4j2's LogLevel orders are inversed (LOG4J2-2315), so we also need to fix here https://github.com/apache/logging-log4j2/blob/rel/2.17.2/log4j-1.2-api/src/main/java/org/apache/log4j/builders/filter/LevelRangeFilterBuilder.java#L97-L98
- lost compatibility with log4j1 here: https://github.com/apache/logging-log4j2/blob/rel/2.17.2/log4j-1.2-api/src/main/java/org/apache/log4j/builders/filter/LevelRangeFilterBuilder.java#L85-L86
I investigated log4j1's behavior:
https://github.com/yueki1993/logging-log4j1/commits/level-range-filter-test
I fixed the class, added UTs and am ready to submit PR:
https://github.com/yueki1993/logging-log4j2/commits/fix-level-range-filter-builder
Attachments
Issue Links
- links to