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

AsyncAppender ignores RingBufferLogEvents from AsyncLoggers (when all loggers async by setting context selector)

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0-rc1
    • 2.0-rc2
    • Appenders, Core
    • None

    Description

      AsyncAppender's #append method currently has this code:

      if (!(logEvent instanceof Log4jLogEvent)) {
          return; // only know how to Serialize Log4jLogEvents
      }
      

      When all loggers are made asynchronous by setting Log4jContextSelector to org.apache.logging.log4j.core.async.AsyncLoggerContextSelector, they produce RingBufferLogEvent instances, not Log4jLogEvent. These log events will be dropped by AsyncAppender.

      Attachments

        Issue Links

        Activity

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

          People

            rpopma Remko Popma
            rpopma Remko Popma
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment