<div dir="ltr"><div><div>Hi,<br><br></div>As mentioned in a comment on LOGBACK-910, the AsyncAppender will silently drop events when the current thread is interrupted. The simplest test for this is:<br><br>    Thread.currentThread().interrupt();<br>    log.warn("message 1"); // This was always dropped<br>    log.warn("message 2"); // This is also dropped since LOGBACK-910 was fixed<br><br>I have recently spent a long time troubleshooting a case where an error was sometimes not logged because of this. Have you considered using something similar to Guava's Uninterruptibles.putUninterruptibly instead, i.e. try to put in a loop while interrupted and reset the interrupt status once the put succeeds? Code-wise this would mean changing AsyncAppenderBase from:<br><br>    private void put(E eventObject) {<br>        if (neverBlock) {<br>            blockingQueue.offer(eventObject);<br>        } else {<br>            try {<br>                blockingQueue.put(eventObject);<br>            } catch (InterruptedException e) {<br>                // Interruption of current thread when in doAppend method should not be consumed<br>                // by AsyncAppender<br>        }<br>    }<br><br></div><div>to something like (assuming no Guava dependency):<br></div><div><br>    private void put(E eventObject) {<br>        if (neverBlock) {<br>            blockingQueue.offer(eventObject);<br>        } else {<br>            putUninterruptibly(eventObject);<br>        }<br>    }<br><br>    private void putUninterruptibly(E eventObject) {<br>        boolean interrupted = false;<br>        try {<br>            while (true) {<br>                try {<br>                    blockingQueue.put(eventObject);<br>                    break;<br>                } catch (InterruptedException e) {<br>                    interrupted = true;<br>                }<br>            }<br>        } finally {<br>            if (interrupted) {<br>                Thread.currentThread().interrupt();<br>            }<br>        }<br>    }<br><br></div><div>Does this make sense? I would be willing to help out with this, but not sure what my next step should be.<br></div><div><br></div><div>/Jakob<br></div></div>