Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
2.17.1
-
None
-
Using log4j 2 bridge API: log4j-1.2-api-2.17.1.jar
Description
Unable to create custom logging level using log4j 2 Bridge API
Following did not create a custom logging level
public static final int FINE_INT = 13000;
public static final Level FINE = new Level(FINE_INT, "FINE", 7);
Using FINE logging level is considered to be DEBUG level by default while printing it
Adding log:
log.log(Level.FINE,"PRINT: Level.FINE log");
Expected log printed:
2022-02-25 15:50:09,208 Main[6788] :main: example.com.Test FINE - PRINT: Level.FINE log
Actual log printed:
2022-02-25 15:50:09,208 Main[6788] :main: example.com.Test DEBUG - PRINT: Level.FINE log
Attachments
Attachments
Issue Links
- is duplicated by
-
LOG4J2-3431 log4j bridge API :- Log message filtering based on UtilLoggingLevel fails and all messages are written into log files
- Closed
- requires
-
LOG4J2-3359 Facility and priority missing in Syslog message when Syslog log appender and pattern layout is used with log4j1-2 bridge API
- Resolved
- links to