protected Appender<ILoggingEvent> wrapAsync(Appender<ILoggingEvent> appender) {
return wrapAsync(appender, appender.getContext());
}
protected Appender<ILoggingEvent> wrapAsync(Appender<ILoggingEvent> appender, Context context) {
final AsyncAppender asyncAppender = new AsyncAppender();
asyncAppender.setQueueSize(queueSize);
asyncAppender.setDiscardingThreshold(discardingThreshold);
asyncAppender.setContext(context);
asyncAppender.setName("async-" + appender.getName());
asyncAppender.addAppender(appender);
asyncAppender.start();
return asyncAppender;
}