public class DiscardingAsyncQueueFullPolicy extends DefaultAsyncQueueFullPolicy
Constructor and Description |
---|
DiscardingAsyncQueueFullPolicy(org.apache.logging.log4j.Level thresholdLevel)
Constructs a router that will discard events equal or less specific
than the specified threshold level when the queue is full.
|
Modifier and Type | Method and Description |
---|---|
static long |
getDiscardCount(AsyncQueueFullPolicy router) |
EventRoute |
getRoute(long backgroundThreadId,
org.apache.logging.log4j.Level level)
Returns the appropriate route for the current log event, given the specified parameters.
|
org.apache.logging.log4j.Level |
getThresholdLevel() |
public DiscardingAsyncQueueFullPolicy(org.apache.logging.log4j.Level thresholdLevel)
thresholdLevel
- level of events to discardpublic EventRoute getRoute(long backgroundThreadId, org.apache.logging.log4j.Level level)
AsyncQueueFullPolicy
getRoute
in interface AsyncQueueFullPolicy
getRoute
in class DefaultAsyncQueueFullPolicy
backgroundThreadId
- the thread ID of the background thread. Can be compared with the current thread's ID.level
- the level of the log eventpublic static long getDiscardCount(AsyncQueueFullPolicy router)
public org.apache.logging.log4j.Level getThresholdLevel()
Copyright © 1999-2020 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.