public interface AsyncLoggerConfigDelegate
Modifier and Type | Method and Description |
---|---|
RingBufferAdmin |
createRingBufferAdmin(String contextName,
String loggerConfigName)
Creates and returns a new
RingBufferAdmin that instruments the ringbuffer of this
AsyncLoggerConfig . |
boolean |
tryCallAppendersInBackground(LogEvent event,
AsyncLoggerConfig asyncLoggerConfig)
If possible, delegates the invocation of
callAppenders to the background thread and returns true . |
boolean tryCallAppendersInBackground(LogEvent event, AsyncLoggerConfig asyncLoggerConfig)
callAppenders
to the background thread and returns true
.
If this is not possible (if it detects that delegating to the background thread would cause deadlock because the
current call to Logger.log() originated from the background thread and the ringbuffer is full) then this method
does nothing and returns false
. It is the responsibility of the caller to process the event when this
method returns false
.event
- the event to delegate to the background threadasyncLoggerConfig
- the logger config to call from the background threadtrue
if delegation was successful, false
if the calling thread needs to process the event
itselfRingBufferAdmin createRingBufferAdmin(String contextName, String loggerConfigName)
RingBufferAdmin
that instruments the ringbuffer of this
AsyncLoggerConfig
.contextName
- name of the LoggerContext
loggerConfigName
- name of the logger configCopyright © 1999-2017 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.