[Bug 211] New: RFE: Flush the appenders.

http://bugzilla.slf4j.org/show_bug.cgi?id=211 Summary: RFE: Flush the appenders. Product: SLF4J Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: blocker Priority: P1 Component: Core API AssignedTo: slf4j-dev@qos.ch ReportedBy: zizka@seznam.cz Would be nice to have a way to flush async appenders, to prevent reference the logging backends explicitly. A use case: Running a server in a shell in background, like, $ startMyServer.sh & It's ok when the server mixes it's output with the other processes in foreground, but after server is started, with flush(), one could sync the log at a single point. For log4j it would call - logger.getAllAppenders() while( allAppenders.hasMoreElements() ){ fileAppender.setImmediateFlush(true); logger.info("Flush"); fileAppender.setImmediateFlush(false); } Other back ends - ??? -- Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.

http://bugzilla.slf4j.org/show_bug.cgi?id=211 Ondrej Zizka <zizka@seznam.cz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |LATER --- Comment #1 from Ondrej Zizka <zizka@seznam.cz> 2010-12-23 17:44:12 --- I didn't find a flush() methods in log4j, so I assume there's no way to implement this RFE at the moment. So I'm resolving this as LATER. -- Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.

http://bugzilla.slf4j.org/show_bug.cgi?id=211 --- Comment #2 from Ondrej Zizka <zizka@seznam.cz> 2010-12-23 17:45:36 --- (No way, except that silly way I put in the description, that is.) -- Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.

http://bugzilla.slf4j.org/show_bug.cgi?id=211 --- Comment #3 from Ondrej Zizka <zizka@seznam.cz> 2011-02-09 20:55:37 CET --- Here's a related discussion from Apache Log4j's Bugzilla: Olivier Dupuy "I totally aggree with the flushing being tied to the level of the event (as in 28647). This totally makes sense and would be good to have it in the default log 4J." ... I would add one more use case: Say, the underlying logging may have buffering enabled. The application, still above logging mechanism abstraction, is aware of this, so needs to flush logs at certain point; e.g. when the developer needs to see the state after some action; or when there are more sources logging to the same stream. https://issues.apache.org/bugzilla/show_bug.cgi?id=41670 -- Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@pixie.qos.ch