[slf4j-dev] [Bug 201] New: Need ability to shutdown loggers and flush appenders

bugzilla-daemon at pixie.qos.ch bugzilla-daemon at pixie.qos.ch
Thu Sep 30 23:34:42 CEST 2010


http://bugzilla.slf4j.org/show_bug.cgi?id=201

           Summary: Need ability to shutdown loggers and flush appenders
           Product: SLF4J
           Version: 1.6.x
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: Core API
        AssignedTo: slf4j-dev at qos.ch
        ReportedBy: mike.schall at gmail.com


There needs to be a way to shutdown logging and flush async appenders so when a
process is closing, all log events are written before the process is closed.

Should ILoggerFactory have a shutdown or stop method?  It could shutdown
whatever logging back end I'm using?

For log4j it would call -
org.apache.log4j.LogManager.getLoggerRepository().shutdown();
For logback it would call - loggerContext.stop()
Other back ends - ???

This is required to allow me to not reference logging back ends explicitly in
my code to shutdown successfully without losing events.

Discussion about this is happening on the user list at -
http://www.qos.ch/pipermail/logback-user/2010-September/001816.html


-- 
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the slf4j-dev mailing list