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

NullPointerException when passing null to java.util.logging.Logger.setLevel()

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4
    • Component/s: JUL adapter
    • Labels:
      None
    • Environment:

      -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager

      Description

      When using a 3rd party library (Twitter Finagle) which uses a custom java.util.logging.Level, I get this:

      Exception in thread "main" java.lang.NullPointerException
              at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:333)
              at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:988)
              at org.apache.logging.log4j.jul.DefaultLevelConverter.toLevel(DefaultLevelConverter.java:119)
              at org.apache.logging.log4j.jul.LevelTranslator.toLevel(LevelTranslator.java:72)
              at org.apache.logging.log4j.jul.CoreLogger.setLevel(CoreLogger.java:47)
              at com.twitter.logging.Logger.setLevel(Logger.scala:63)
      

        Attachments

        1. setlevel.patch
          3 kB
          Mikael Ståldal

          Activity

            People

            • Assignee:
              garydgregory Gary Gregory
              Reporter:
              mikaelstaldal Mikael Ståldal
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: