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. |
void |
enqueueEvent(LogEvent event,
AsyncLoggerConfig asyncLoggerConfig)
Enqueues the
LogEvent on the mixed configuration ringbuffer. |
EventRoute |
getEventRoute(Level level)
Returns the
EventRoute for the event with the specified level. |
void |
setLogEventFactory(LogEventFactory logEventFactory)
Notifies the delegate what LogEventFactory an AsyncLoggerConfig is using, so the delegate can determine
whether to populate the ring buffer with mutable log events or not.
|
boolean |
tryEnqueue(LogEvent event,
AsyncLoggerConfig asyncLoggerConfig) |
RingBufferAdmin createRingBufferAdmin(String contextName, String loggerConfigName)
RingBufferAdmin that instruments the ringbuffer of this
AsyncLoggerConfig.contextName - name of the LoggerContextloggerConfigName - name of the logger configEventRoute getEventRoute(Level level)
EventRoute for the event with the specified level.level - the level of the event to logEventRoutevoid enqueueEvent(LogEvent event, AsyncLoggerConfig asyncLoggerConfig)
LogEvent on the mixed configuration ringbuffer.
This method must only be used after tryEnqueue(LogEvent, AsyncLoggerConfig) returns false
indicating that the ringbuffer is full, otherwise it may incur unnecessary synchronization.boolean tryEnqueue(LogEvent event, AsyncLoggerConfig asyncLoggerConfig)
void setLogEventFactory(LogEventFactory logEventFactory)
logEventFactory - the factory usedCopyright © 1999-2021 The 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.