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()

        Attachments

          Activity

            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: