[ 
https://issues.apache.org/jira/browse/LOG4J2-1999?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary Gregory updated LOG4J2-1999:
---------------------------------
    Description: 
_emphasized text_On line 166 HighlightConverter maps the level in the highlight 
 style option to a Level using the single-argument toLevel(). This defaults to 
{{DEBUG}} if the level is not found. It needs to use getLevel() so it can get a 
null return value to report errors
{code}
                final Level level = Level.toLevel(key);
{code}
should be 
{code}
                final Level level = Level.getLevel(key);
{code}

The error message should also be fixed to use {{Level.values()}} instead of 
{{DEFAULT_STYLES.keySet().toArray()}}

  was:
On line 166 HighlightConverter maps the level in the highlight  style option to 
a Level using the single-argument toLevel(). This defaults to {{DEBUG}} if the 
level is not found. It needs to use getLevel() so it can get a null return 
value to report errors
{code}
                final Level level = Level.toLevel(key);
{code}
should be 
{code}
                final Level level = Level.getLevel(key);
{code}

The error message should also be fixed to use {{Level.values()}} instead of 
{{DEFAULT_STYLES.keySet().toArray()}}


> HilightConverter converts all unrecognised levels to DEBUG
> ----------------------------------------------------------
>
>                 Key: LOG4J2-1999
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1999
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Configurators
>    Affects Versions: 2.8.2
>            Reporter: Paul Burrowes
>            Assignee: Gary Gregory
>            Priority: Minor
>
> _emphasized text_On line 166 HighlightConverter maps the level in the 
> highlight  style option to a Level using the single-argument toLevel(). This 
> defaults to {{DEBUG}} if the level is not found. It needs to use getLevel() 
> so it can get a null return value to report errors
> {code}
>                 final Level level = Level.toLevel(key);
> {code}
> should be 
> {code}
>                 final Level level = Level.getLevel(key);
> {code}
> The error message should also be fixed to use {{Level.values()}} instead of 
> {{DEFAULT_STYLES.keySet().toArray()}}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to