tcmot commented on issue #2023: URL: https://github.com/apache/logging-log4j2/issues/2023#issuecomment-1869175416
Hi,@jvz ``` RandomAccessFile FileChannel channel = randomAccessFile.getChannel(); randomAccessFile.write(); channel.force(true); ``` Use the force method,the file be updated in real time. But affects performance. Log4j2,not use the force method. Rewrite RollingRandomAccessFileManager and RandomAccessFileManager flush method. Add the code above. Or add the above code when rolling over the file. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
