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)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0-rc1
    • Fix Version/s: 2.0-rc2
    • Component/s: Appenders, Core
    • Labels:
      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

              People

              • Assignee:
                remkop@yahoo.com Remko Popma
                Reporter:
                remkop@yahoo.com Remko Popma
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: