remkop commented on issue #257: LOG4J2-2552 Allow access to the backlog state of the disruptor to improve program… URL: https://github.com/apache/logging-log4j2/pull/257#issuecomment-468825843 Hi @ptogher, sorry I haven't had a chance to look at this earlier. The information you are looking for is already available in current versions of Log4j, although in slightly less convenient form, if you do: ``` RingBufferAdmin admin = asyncLoggerContext.createRingBufferAdmin(); boolean hasBacklog = admin.getRemainingCapacity() != admin.getBufferSize(); ``` Please be aware that if you have an application that is logging from multiple threads, and one of these threads asks the question "do we have a logging backlog", the answer may be stale immediately. This is simply the nature of multi-threading. The answer is only reliable if the application logs from a single thread, or if you can somehow stop all threads from producing log events.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
