package io.dropwizard.request.logging.async;

import ch.qos.logback.access.spi.IAccessEvent;
import ch.qos.logback.core.AsyncAppenderBase;
import io.dropwizard.logging.async.AsyncAppenderFactory;

/**
 * An implementation of {@link AsyncAppenderFactory} for {@link IAccessEvent}.
 */
public class AsyncAccessEventAppenderFactory implements AsyncAppenderFactory<IAccessEvent> {

    /**
     * Creates an {@link AsyncAppenderFactory} of type {@link IAccessEvent} that prepares events
     * for deferred processing
     * @return the {@link AsyncAppenderFactory}
     */
    @Override
    public AsyncAppenderBase<IAccessEvent> build() {
        return new AsyncAppenderBase<IAccessEvent>() {
            @Override
            protected void preprocess(IAccessEvent event) {
                event.prepareForDeferredProcessing();
            }
        };
    }
}

@@ -417,23 +417,20 @@
 Appender
-Factory
+Base
 %7D of typ
@@ -455,60 +455,9 @@
 ent%7D
- that prepares events%0A     * for deferred processing
+.
 %0A   
@@ -492,23 +492,20 @@
 Appender
-Factory
+Base
 %7D%0A     *
@@ -629,170 +629,8 @@
 t%3E()
- %7B%0A            @Override%0A            protected void preprocess(IAccessEvent event) %7B%0A                event.prepareForDeferredProcessing();%0A            %7D%0A        %7D
 ;%0A  

Fix request attribute-related race condition in Logback request logging