minkyu97 opened a new issue, #2492:
URL: https://github.com/apache/logging-log4j2/issues/2492

   ## Description
   
   Rollover does not work appropritely when combining `CronTriggeringPolicy` 
and `SizeBasedTriggeringPolicy`.
   In more detail, (1) After `CronTriggerinPolicy` has triggered,(2) before 
enough time passed for the the filename to change, `SizeBasedTriggeringPolicy` 
is ignored.
   In this case, rollover does not occur, and logs continue to accumulate in 
the same file. Additional logs may even be lost after gzip if you have 
configured gzip.
   
   ## Configuration
   
   **Version:** 2.23.1
   
   **Operating system:** [OS and version]
   Mac OS M1 arm64 Sonoma
   
   **JDK:** [JDK distribution and version]
   temurin 11.0.18
   
   **but OS and JDK no matter**
   
   ## Reproduction
   
   https://github.com/minkyu97/log4j2-test
   In the repository above, you can reproduce the issue. As you can see in the 
`log4j2.xml` file, `CronTriggeringPolicy` is set to every minute, and 
`SizeBasedTriggeringPolicy` is set to 10KB. When you run the `Main` class, 
initially `SizeBasedTriggeringPolicy` works fine, but after 
`CronTriggeringPolicy` has triggered at least once, `SizeBasedTriggeringPolicy` 
doesn't work anymore.


-- 
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]

Reply via email to