Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-1486

logback-access should provide async appender

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • None
    • None

    Description

      Just like logback-classic does for normal logs.

      At the first glance the base class (AsyncAppenderBase) looks like it can be used with access logs - it is not an abstract one and nothing hints it should not. But that class misses a call to event object's prepareForDeferredProcessing method so is not good for Jetty that can recycle the request objects.

      The implementation is straightforward:

      import ch.qos.logback.access.spi.IAccessEvent;
      import ch.qos.logback.core.AsyncAppenderBase;
      
      public class AsyncAccessAppender extends AsyncAppenderBase<IAccessEvent> {
          @Override
          protected void preprocess(final IAccessEvent eventObject) {
              eventObject.prepareForDeferredProcessing();
          }
      }

       

      Attachments

        Activity

          People

            logback-dev Logback dev list
            dimas Dmitry Andrianov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: