Gao Jie created LOG4J2-1726: ------------------------------- Summary: RollingFile appender doesn't gzip and rolling log archives Key: LOG4J2-1726 URL: https://issues.apache.org/jira/browse/LOG4J2-1726 Project: Log4j 2 Issue Type: Bug Components: Appenders Affects Versions: 2.7 Environment: Debian7.5 x64 with both openjdk7 and latest oraclejdk8. Reporter: Gao Jie
When crossing diffenrent device, the newer version of log4j can't work with RollingFile appender. my config is: ``` <RollingFile name="RollingFile" fileName="/opt/tmp/chat_server_all.log" bufferedIO="true" bufferSize="50000" filePattern="logs/$${date:yyyy-MM}/chat_server_info-%d{yyyy-MM-dd}-%i.log.gz"> <PatternLayout pattern="%d{yyyy.MM.dd 'at' HH:mm:ss z} %-5level %class{36} %L %M - %msg%xEx%n"/> <Policies> <SizeBasedTriggeringPolicy size="500 MB" /> <TimeBasedTriggeringPolicy interval="6" modulate="true"/> </Policies> <DefaultRolloverStrategy max="50"/> </RollingFile> ``` the `fileName` and `filePattern` is on different devices: tmpfs on /opt/tmp type tmpfs (rw,relatime,size=20971520k) /dev/sda4 on /home type ext4 however there is an Exception java.nio.file.Atomic Move NotSupportedException. THen, only one archive log file under logs/2016-12/: chat_server_info-2016-12-08-1.log and never compressed. `RollingRandomAccessFile` has the same problem. However log4j 2.1 works well. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org