I have the following log4j2.xml configuration. I have a time as well as size based triggering policy. Since the size limit (10 MB) is breached first, the log file rolls over and while creating a new file, it appends wrong date to the filename. What I want is:
- Roll over when a file's size reaches 10 MB (total size of all files should not exceed 1500 times 10 MB)
- Roll over every 15 days
The file names should be abc.log, abc__2021-04-09__1.log, abc__2021-04-09__2.log. Basically it should have the current date appended to it.
Kindly let me know where am I wrong in my code. Thanks in advance.