You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "ppkarwasz (via GitHub)" <gi...@apache.org> on 2024/02/18 10:14:37 UTC
[I] SizeBasedTriggeringPolicy counter not resetting after TimeBasedTriggeringPolicy rollover (logging-log4j2)
ppkarwasz opened a new issue, #2297:
URL: https://github.com/apache/logging-log4j2/issues/2297
### 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: notifications-unsubscribe@logging.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] SizeBasedTriggeringPolicy counter not resetting after TimeBasedTriggeringPolicy rollover (logging-log4j2)
Posted by "rgoers (via GitHub)" <gi...@apache.org>.
rgoers commented on issue #2297:
URL: https://github.com/apache/logging-log4j2/issues/2297#issuecomment-2304804752
Sorry for not getting to this. @ppkarwasz have you already created a fix for this?
--
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-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] SizeBasedTriggeringPolicy counter not resetting after TimeBasedTriggeringPolicy rollover (logging-log4j2)
Posted by "ppkarwasz (via GitHub)" <gi...@apache.org>.
ppkarwasz commented on issue #2297:
URL: https://github.com/apache/logging-log4j2/issues/2297#issuecomment-2304914254
> Sorry for not getting to this. @ppkarwasz have you already created a fix for this?
No, but I can look into it after 2.24.0 is released.
--
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-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org