Class DefaultAsyncQueueFullPolicy
- java.lang.Object
-
- org.apache.logging.log4j.core.async.DefaultAsyncQueueFullPolicy
-
- All Implemented Interfaces:
AsyncQueueFullPolicy
- Direct Known Subclasses:
DiscardingAsyncQueueFullPolicy
public class DefaultAsyncQueueFullPolicy extends Object implements AsyncQueueFullPolicy
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
Constructors Constructor Description DefaultAsyncQueueFullPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EventRoute
getRoute(long backgroundThreadId, Level level)
Returns the appropriate route for the current log event, given the specified parameters.
-
-
-
Method Detail
-
getRoute
public EventRoute getRoute(long backgroundThreadId, Level level)
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
-
-