Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-3162

Fix misleading documentation for immediateFlush

    XMLWordPrintableJSON

    Details

    • Type: Documentation
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.14.1
    • Fix Version/s: 3.0.0, 2.15.0
    • Component/s: Appenders
    • Labels:
      None

      Description

      In the documentation of RollingFileAppender

       

      immediateFlush boolean When set to true - the default, each write will be followed by a flush. This will guarantee the data is written to disk but could impact performance.Flushing after every write is only useful when using this appender with synchronous loggers. Asynchronous loggers and appenders will automatically flush at the end of a batch of events, even if immediateFlush is set to false. This also guarantees the data is written to disk but is more efficient.
      

      This is misleading. The appender does not really guarantee that the data is written to disk . All it does is call the underlying OutputStream.flush()method, which does not guaratee that data is written to disk. It only guaratees that the data is handed over to the operating system

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vy Volkan Yazici
                Reporter:
                agsharath Sharath Avadoot Gururaj
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: