[ 
https://issues.apache.org/jira/browse/LOG4J2-3419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17515555#comment-17515555
 ] 

ASF subversion and git services commented on LOG4J2-3419:
---------------------------------------------------------

Commit 4c63bbf7299b404a308c61167db83b0c32d9d322 in logging-log4j2's branch 
refs/heads/master from Piotr P. Karwasz
[ https://gitbox.apache.org/repos/asf?p=logging-log4j2.git;h=4c63bbf ]

[LOG4J2-3419] Add a Log4j 1.x level name pattern converter

When custom levels are in play the names of Log4j 1.x custom levels
(which are not unique) and those of Log4j 2.x custom levels (which must
be unique) do not match.

There is a need therefore for a pattern converter specific to Log4j 1.x.

Conflicts:
        
log4j-1.2-api/src/main/java/org/apache/log4j/builders/layout/PatternLayoutBuilder.java
        
log4j-1.2-api/src/main/java/org/apache/log4j/builders/layout/SimpleLayoutBuilder.java


> 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 Gawande
>            Assignee: Piotr Karwasz
>            Priority: Blocker
>             Fix For: 2.17.3
>
>         Attachments: DemoCustom.zip, Level.java, log4j.properties
>
>
> 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 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to