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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 2.4
    • 2.4
    • JUL adapter
    • None
    • -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

            ggregory Gary D. Gregory
            mikaelstaldal Mikael Ståldal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: