Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.8
-
None
Description
Currently, AsyncLoggerConfigDisruptor::enqueueEvent, AsyncLoggerDisruptor::tryPublish and AsyncLoggerDisruptor::enqueueLogMessageInfo catch exceptions when logging occurs after the context has been stopped.
These errors are currently handled by logging to the status logger:
LOGGER.warn("Ignoring log event after log4j was shut down.", contextName);
This can be improved by adding more details from the LogEvent that is being dropped:
LOGGER.warn("Ignoring log event after log4j was shut down: {} [{}] {}", event.getLevel(), event.getLoggerName(), event.getMessage().getFormattedMessage() + (event.getThrown() == null ? "" : Throwables.toStringList(event.getThrown())));