You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Ragini Chandrakant Gawande (Jira)" <ji...@apache.org> on 2022/03/01 06:43:00 UTC
[jira] [Updated] (LOG4J2-3419) Unable to create custom logging level using log4j 2 Bridge API
[ https://issues.apache.org/jira/browse/LOG4J2-3419?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ragini Chandrakant Gawande updated LOG4J2-3419:
-----------------------------------------------
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 consider it to be DEBUG level by default
*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
was:
Unable to create custom logging level using log4j 2 Bridge API
Following did not create a custom logging level
*public static final Level FINE = new Level(FINE_INT, "FINE", 7);*
Using FINE logging level consider it to be DEBUG level by default
*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
> Unable to create custom logging level using log4j 2 Bridge API
> --------------------------------------------------------------
>
> Key: LOG4J2-3419
> URL: https://issues.apache.org/jira/browse/LOG4J2-3419
> Project: Log4j 2
> Issue Type: Bug
> Components: Log4j 1.2 bridge
> Affects Versions: 2.17.1
> Environment: Using log4j 2 bridge API: log4j-1.2-api-2.17.1.jar
> Reporter: Ragini Chandrakant Gawande
> Priority: Blocker
>
> 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 consider it to be DEBUG level by default
> *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
--
This message was sent by Atlassian Jira
(v8.20.1#820001)