public interface AsyncQueueFullPolicy
The asynchronous logging queue may become full when the application is logging faster than the underlying appender can keep up with for a long enough time to fill up the bounded queue. When this happens, the logging subsystem has to choose what to do with the event:
toString()on a message parameter, and the parameter object makes a logging call from its
DefaultAsyncQueueFullPolicy. The benefit of this approach is that events will not get lost, but the disadvantage is that the resulting log file will be confusing for users, since log events will appear in the log file in random order: new events that are directly logged are followed by older log events taken from the queue.
AsyncQueueFullPolicyFactory for how to install a custom policy.
EventRoute getRoute(long backgroundThreadId, org.apache.logging.log4j.Level level)
backgroundThreadId- the thread ID of the background thread. Can be compared with the current thread's ID.
level- the level of the log event
Copyright © 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.