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