[slf4j-dev] [Bug 201] Need ability to shutdown loggers and flush appenders
bugzilla-daemon at qos.ch
bugzilla-daemon at qos.ch
Mon Feb 3 17:56:53 CET 2014
http://bugzilla.slf4j.org/show_bug.cgi?id=201
Chetan Mehrotra <chetan.mehrotra at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |chetan.mehrotra at gmail.com
--- Comment #13 from Chetan Mehrotra <chetan.mehrotra at gmail.com> ---
Another option can be that if the ILoggerFactory implementation also implements
the Closeable interface [1]. Then client code need not depend on specific API
but can be generic
import org.slf4j.LoggerFactory;
if(LoggerFactory.getILoggerFactory() implements Closeable){
((Closeable)LoggerFactory.getILoggerFactory()).close();
}
Thus if any of the bindings require cleanup then there respetive factories
implement the Closeable interface e.g. Logback
[1] http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/slf4j-dev/attachments/20140203/d4e78ba6/attachment.html>
More information about the slf4j-dev
mailing list