You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Yohei Ueki (Jira)" <ji...@apache.org> on 2022/06/09 13:27:00 UTC

[jira] [Created] (LOG4J2-3534) LevelRangeFilterBuilder loses compatibility with log4j1.

Yohei Ueki created LOG4J2-3534:
----------------------------------

             Summary: LevelRangeFilterBuilder loses compatibility with log4j1.
                 Key: LOG4J2-3534
                 URL: https://issues.apache.org/jira/browse/LOG4J2-3534
             Project: Log4j 2
          Issue Type: Bug
          Components: Log4j 1.2 bridge
            Reporter: Yohei Ueki


[LevelRangeFilterBuilder|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] 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
- 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



--
This message was sent by Atlassian Jira
(v8.20.7#820007)