Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-1999

HighlightConverter converts all unrecognised levels to DEBUG

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.8.2
    • Fix Version/s: 2.9.0
    • Component/s: Configurators
    • Labels:
      None

      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

                      final Level level = Level.toLevel(key);
      

      should be

                      final Level level = Level.getLevel(key);
      

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

        Activity

        Hide
        garydgregory Gary Gregory added a comment -

        In git master. Please verify and close this issue.

        Show
        garydgregory Gary Gregory added a comment - In git master. Please verify and close this issue.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 40582bee4e7a4946a1c87738084f1e98cbe42541 in logging-log4j2's branch refs/heads/master from Gary Gregory
        [ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=40582be ]

        LOG4J2-1999 HighlightConverter converts all unrecognized levels to
        DEBUG.

        Show
        jira-bot ASF subversion and git services added a comment - Commit 40582bee4e7a4946a1c87738084f1e98cbe42541 in logging-log4j2's branch refs/heads/master from Gary Gregory [ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=40582be ] LOG4J2-1999 HighlightConverter converts all unrecognized levels to DEBUG.

          People

          • Assignee:
            garydgregory Gary Gregory
            Reporter:
            pburrowesOC Paul Burrowes
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development