bugzilla | 2 Oct 13:39
Favicon

DO NOT REPLY [Bug 45934] New: FileAppender should use virtual-machine shutdown hook that flushes buffer automatically

https://issues.apache.org/bugzilla/show_bug.cgi?id=45934

           Summary: FileAppender should use virtual-machine shutdown hook
                    that flushes buffer automatically
           Product: Log4j
           Version: 1.2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Appender
        AssignedTo: log4j-dev <at> logging.apache.org
        ReportedBy: m <at> rtin-burger.de

If org.apache.log4j.FileAppender buffers output (option BufferedIO set to
true), then the underlying WriterAppender's field immediateFlush will set to
false.

So, the FileAppender will skip flushing and it is very likely that the last few
log events will not be recorded on disk when the application exits.

To avoid the loss of these events, an optional virtual-machine shutdown that
flushes automatically at the end should be used.

--

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

Gmane