roytmana commented on issue #3593:
URL: 
https://github.com/apache/logging-log4j2/issues/3593#issuecomment-2802364036

   @vy 
   Potentially file output stream could be opened using NIO with 
`java.nio.file.StandardOpenOption.SYNC` option. It probably (need to test) will 
do the trick but I am wondering if there will be any noticeable performance 
penalty since it'll happen on every write
   
   I can test it as well (not with log4j but with a plain text file)
   
   
       /**
        * Requires that every update to the file's content or metadata be 
written
        * synchronously to the underlying storage device.
        *
        * @see <a href="package-summary.html#integrity">Synchronized I/O file 
integrity</a>
        */
       SYNC,
   
       /**
        * Requires that every update to the file's content be written
        * synchronously to the underlying storage device.
        *
        * @see <a href="package-summary.html#integrity">Synchronized I/O file 
integrity</a>
        */
       DSYNC;


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to