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

HighlightConverter converts all unrecognised levels to DEBUG

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.8.2
    • 2.9.0
    • Configurators
    • 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

            ggregory Gary D. Gregory
            pburrowesOC Paul Burrowes
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: