What is the difference between RollingFile and RollingRandomAccessFile in log4j2 configuration

In our current implementation, one of the servers has a configuration for log4j2 set for the RollingRandomAccessFile and in the other RollingFile. I would like to know what is the difference between these two and the pluses and minuses of each, if possible.

thank

+4
source share
1 answer

The main difference is performance: http://logging.apache.org/log4j/2.x/manual/async.html#FileAppender_vs._RandomAccessFileAppender

RandomAccessFileAppender , FileAppender (bufferedIO). " ", , (, ). , RandomAccessFileAppender : 256 * 1024 8 * 1024 FileAppender ( ).

: RandomAccessFile OutputStream ( ). RandomAccessFileAppender unrotect logrotate (https://issues.apache.org/jira/browse/LOG4J2-354), Log4j RollingRandomAccessFile logrotate unix. -, FileAppender logrotate - - . ( Rolling... , , , .)

+5

Source: https://habr.com/ru/post/1570435/


All Articles