Description
LOG4J2-2031 highlighted that the default queue size (128) for AsyncAppender is extremely small compared to the async logger defaults.
Even small event bursts will likely fill up the queue and cause messages to appear in the log file out of order. Until LOG4J2-2031 is fixed, a larger queue size will make this less likely to happen.
Better recursion detection (see LOG4J2-2031) will fix the out-of-sequence messages. From that point, when the queue is full the logging call will block until a slot in the queue becomes available, so the only impact of a small queue is performance. From a performance perspective it is also desirable to have a default queue size of something like 1K slots to handle moderate-size bursts of events smoothly.
Attachments
Issue Links
- relates to
-
LOG4J2-2031 Messages appear out of order in log file (was: Log4j2 log file not reflecting application log function calls)
- Resolved