ppkarwasz commented on issue #2721:
URL:
https://github.com/apache/logging-log4j2/issues/2721#issuecomment-2247106196
Hi @Nef91,
Thank You for reaching out.
The `%d` pattern of the `filePattern` should be replaced with the timestamp
of the **previous** rollover. For example at midnight of `2024-07-08` the
rolling file appender will move `console.log` to `console-2024-07-07_1.log`.
The reason for this behavior is that the `console-2024-07-07_1.log` file
contains log events issued from `2024-07-07 00:00` to `2024-07-07 23:59`.
The `TimeBasedTriggeringPolicy` should behave the same way
`CronTriggeringPolicy` does and the fact that it uses the timestamp of the
**current** rollover is IMHO a bug. @rgoers, what do you think?
In any case, you can use the `$${date:yyyy-MM-dd}` runtime lookup together
with `CronTriggeringPolicy`, which will be expanded to the **current** date.
--
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]