use of io.dropwizard.request.logging.async.AsyncAccessEventAppenderFactory in project dropwizard by dropwizard.
the class LogbackAccessRequestLogFactory method build.
@Override
public RequestLog build(String name) {
final Logger logger = (Logger) LoggerFactory.getLogger("http.request");
logger.setAdditive(false);
final LoggerContext context = logger.getLoggerContext();
final LogbackAccessRequestLog requestLog = new LogbackAccessRequestLog();
final LevelFilterFactory<IAccessEvent> levelFilterFactory = new NullLevelFilterFactory<>();
final AsyncAppenderFactory<IAccessEvent> asyncAppenderFactory = new AsyncAccessEventAppenderFactory();
final LayoutFactory<IAccessEvent> layoutFactory = new LogbackAccessRequestLayoutFactory();
for (AppenderFactory<IAccessEvent> output : appenders) {
requestLog.addAppender(output.build(context, name, layoutFactory, levelFilterFactory, asyncAppenderFactory));
}
return requestLog;
}
Aggregations