Steps to reproduce:
1) Run code in attached file. It will create log file named 'Error' in
with one log message
2) Change time on your computer to next day
3) Rerun code. It will add another message to the same file.
on step 3 log4j must create new File
- is duplicated by
LOG4J2-2560 RollingFileAppender cannot be configured with both OnStartupTriggeringPolicy and createOnDemand="true"
- is related to
LOG4J2-2238 Insufficient Permissions Error when Rolling Log Files