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

NPE in AsyncLogger.log(..)

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0-rc1
    • 2.0-rc2
    • Appenders
    • None

    Description

      Our production environment suffers from

      java.lang.NullPointerException at org.apache.logging.log4j.core.async.AsyncLogger.log(AsyncLogger.java:273)
          at org.apache.logging.log4j.spi.AbstractLoggerWrapper.log(AbstractLoggerWrapper.java:121)
          at org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:1006) 
          at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:873) 
          at org.springframework.context.support.AbstractApplicationContext$1.run(AbstractApplicationContext.java:809)
      

      It looks like something in our app is still logging despite the AsyncLogger having been stopped (and the disruptor field set to null).

      The logger could print out a more informative message in this situation.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            rpopma Remko Popma
            mck Michael Semb Wever
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment