Class DefaultAsyncQueueFullPolicy
java.lang.Object
org.apache.logging.log4j.core.async.DefaultAsyncQueueFullPolicy
- All Implemented Interfaces:
AsyncQueueFullPolicy
- Direct Known Subclasses:
DiscardingAsyncQueueFullPolicy
Default router: enqueue the event for asynchronous logging in the background thread, unless the current thread is the
background thread and the queue is full (enqueueing would cause a deadlock). In that case send the event directly to
the appender (in the current thread).
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the appropriate route for the current log event, given the specified parameters.
-
Constructor Details
-
DefaultAsyncQueueFullPolicy
public DefaultAsyncQueueFullPolicy()
-
-
Method Details
-
getRoute
Description copied from interface:AsyncQueueFullPolicy
Returns the appropriate route for the current log event, given the specified parameters.- Specified by:
getRoute
in interfaceAsyncQueueFullPolicy
- Parameters:
backgroundThreadId
- the thread ID of the background thread. Can be compared with the current thread's ID.level
- the level of the log event- Returns:
- the appropriate route for the current event
-