[logback-dev] [JIRA] Resolved: (LBCORE-50) FlushableAppender

Ceki Gulcu (JIRA) noreply-jira at qos.ch
Mon Oct 27 16:28:21 CET 2008

     [ http://jira.qos.ch/browse/LBCORE-50?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ceki Gulcu resolved LBCORE-50.

    Resolution: Duplicate

> FlushableAppender
> -----------------
>                 Key: LBCORE-50
>                 URL: http://jira.qos.ch/browse/LBCORE-50
>             Project: logback-core
>          Issue Type: Improvement
>          Components: Appender
>    Affects Versions: unspecified
>         Environment: Operating System: Linux
> Platform: PC
>            Reporter: Bruno Navert
>            Assignee: Logback dev list
>            Priority: Minor
> Have appender implement the java.io.Flushable interface, or a logback-specific interface if preferred, so that we can call Appender.flush() to manually flush the appender's writer. Not all appenders would have this, only those  that implement Flushable.
> This would be useful in the context where buffered IO is used, but we still want to ensure a flush is made at specific intervals. For instance, in development I create a Spring bean that listens to application events, and force-flushes logback after each http request has been processed by my application, ensuring that I always see all the error logs when something fails.
> I have accomplished by subclassing RollingFileAppender to implement Flushable, quite simply like this:
>     public void flush() throws IOException
>     {
>         writer.flush();
>     }

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the logback-dev mailing list