Log4j 2
  1. Log4j 2
  2. LOG4J2-668

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor 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.

        Issue Links

          Activity

          Hide
          Remko Popma added a comment -

          Fixed in revision 1602582.

          Show
          Remko Popma added a comment - Fixed in revision 1602582.

            People

            • Assignee:
              Remko Popma
              Reporter:
              Remko Popma
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development