void callAppendersInBackgroundThread(final LogEvent event) { delegate.enqueueEvent(event, this); }
/** * Passes on the event to a separate thread that will call * {@link #asyncCallAppenders(LogEvent)}. */ @Override protected void callAppenders(final LogEvent event) { populateLazilyInitializedFields(event); if (!delegate.tryEnqueue(event, this)) { final EventRoute eventRoute = delegate.getEventRoute(event.getLevel()); eventRoute.logMessage(this, event); } }
/** * Creates and returns a new {@code RingBufferAdmin} that instruments the * ringbuffer of this {@code AsyncLoggerConfig}. * * @param contextName name of the {@code LoggerContext} * @return a new {@code RingBufferAdmin} that instruments the ringbuffer */ public RingBufferAdmin createRingBufferAdmin(final String contextName) { return delegate.createRingBufferAdmin(contextName, getName()); }
protected AsyncLoggerConfig(final String name, final List<AppenderRef> appenders, final Filter filter, final Level level, final boolean additive, final Property[] properties, final Configuration config, final boolean includeLocation) { super(name, appenders, filter, level, additive, properties, config, includeLocation); delegate = config.getAsyncLoggerConfigDelegate(); delegate.setLogEventFactory(getLogEventFactory()); }