[logback-user] Shutting down async appenders, when using logback through slf4j

Mads Bondo Dydensborg mbd at dbc.dk
Thu Jun 13 13:21:27 CEST 2013

Hi all

I have a feeling that this is a FAQ, but my google-foo failed me.

We provide an application that uses slf4j. The users configure it, in logback.xml, to use, among other things, an async appender.

Tomcat complains about this, when redeploying or shutting down:

SEVERE: The web application [/openformat] appears to have started a thread named [AsyncAppender-Worker-Thread-2] but has failed to stop it. This is very likely to create a memory leak.

I found this issue/request: http://bugzilla.slf4j.org/show_bug.cgi?id=201 (Need ability to shutdown loggers and flush appenders), but it does not seem that this request has been honored.

So, what is the recommended way to solve this? We would like to not hardcode the app to use logback (as it could potentially be used with log4j), but there seems to be no way to stop an async appender that the users have configured in?

Thanks in advance.


Med venlig hilsen/Regards

Chefarkitekt/Chief Architect cand.scient.dat, Ph.d., Mads Bondo Dydensborg
Dansk BiblioteksCenter A/S, Tempovej 7-11, 2750 Ballerup, Tlf. +45 29 84 00 42

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20130613/affb6344/attachment.html>

More information about the Logback-user mailing list