Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
1.2.3
-
None
-
(Not environment specific.)
Description
The AsyncAppender worker thread, defined in AsyncAppenderBase, consumes log entries from a bounded blocking queue. Should this worker thread terminate prematurely for any reason and the AsyncAppender be configured as blocking (neverBlock=false) the queue fills and any calls to log block indefinitely.
The worker thread is currently indirectly tolerant of exceptions thrown by an appender, due to the exception handling in AppenderBase.doAppend, but this exception handling does not cover other Throwable types.
Ideally, the AsyncAppender worker thread should do everything possible to stay alive while the appender is started.
Please find attached a patch that can be applied to logback 1.2.3 and/or logback master.
Branch of master with patch applied: https://github.com/greg-a-atkinson/logback/tree/master_LOGBACK-1354
Branch of tag 1.2.3 with patch applied: https://github.com/greg-a-atkinson/logback/tree/v_1.2.3_LOGBACK-1354