All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.dropwizard.request.logging.async.AsyncAccessEventAppenderFactory Maven / Gradle / Ivy

There is a newer version: 5.0.0-alpha.2
Show newest version
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 {

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy