What | Removed | Added |
---|---|---|
CC | chetan.mehrotra@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