ppkarwasz opened a new issue, #2877: URL: https://github.com/apache/logging-log4j2/issues/2877
Whenever the rest of the `filePattern` changes, the `%i` counter should return to its initial value. Apparently this is not the case. ### Discussed in https://github.com/apache/logging-log4j2/discussions/1842 <div type='discussions-op-text'> <sup>Originally posted by **RollsCorey** October 6, 2023</sup> Hello. Using log4j 2.20.0. My configuration file specifies a SizeBasedTriggeringPolicy and a TimeBasedTriggeringPolicy. My understanding is that when the log rolls due to the TimeBasedTriggeringPolicy, the counter associated with the SizeBasedTriggeringPolicy should reset to 1, but this isn't happening. It just keeps incrementing from where it left off. Here is my config file. Any ideas? Thanks in advance. ``` <Configuration status="warn"> <Properties> <Property name="basePath">Y:/logs</Property> </Properties> <Appenders> <RollingFile name="fileLogger" filePattern="${basePath}/log_%d{yyyyMMdd}_%i.txt"> <PatternLayout> <pattern>%d{MM/dd/yy HH:mm:ss.SSS} %msg%n </pattern> </PatternLayout> <Policies> <SizeBasedTriggeringPolicy size="10 MB"/> <TimeBasedTriggeringPolicy /> </Policies> <DirectWriteRolloverStrategy maxFiles="10000"/> </RollingFile> </Appenders> <Loggers> <Root level="info" additivity="false"> <appender-ref ref="fileLogger" /> </Root> </Loggers> </Configuration> ``` </div> -- 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]
