You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by "Paul Burrowes (JIRA)" <ji...@apache.org> on 2017/08/03 04:46:03 UTC
[jira] [Updated] (LOG4J2-1999) HilightConverter converts all
unrecognised levels to DEBUG
[ https://issues.apache.org/jira/browse/LOG4J2-1999?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Burrowes updated LOG4J2-1999:
----------------------------------
Description:
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}
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 the two-argument toLevel() 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.toLevel(key, null);
{code}
> 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
> Priority: Minor
>
> 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}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)