JohnLussmyer opened a new issue, #1870: URL: https://github.com/apache/logging-log4j2/issues/1870
## Description When using a RollingRandomAccessFile appender that zips the logs, and there are multiple threads really spewing logging, when log4j zip's the previous log file - it often uses the name of the current log file. So, the base log file name is "stuff.log". Rolling every 100MB into stuff.%i.log.zip. What I'm getting is stuff.1.log.zip contains stuff.7.log. All zips up to 7 contain stuff.7.log - though the actual log content is what is expected for stuff.1, or stuff.2, etc.. So the correct file is getting zipped - but given the wrong file name. ## Configuration **Version:** Log4j 2.21.0 **Operating system:** [OS and version] Win 11 **JDK:** [JDK distribution and version] Adoptium JDK-17.0.5+8 ## Logs ## Reproduction <RollingRandomAccessFile name="Log" fileName="${sys:metrixLogFolder}/${sys:metrixLogName}.log" filePattern="${sys:metrixLogFolder}/${sys:metrixLogName}.%i.log.zip"> <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%20.20t] %-5level %30.30logger - %msg%n" header="Application: ${sys:metrixBuild}%n" /> <Policies> <OnStartupTriggeringPolicy /> <SizeBasedTriggeringPolicy size="100 MB" /> </Policies> </RollingRandomAccessFile> -- 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.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org