TimedRotatingFileHandler not working correctly with PyInstaller

19 views
Skip to first unread message

Alexander Bauer

unread,
Nov 26, 2021, 7:53:43 AM11/26/21
to PyInstaller
Hi, 

I'm using a TimedRotatingFileHandler for my logs, to rotate the logs at midnight. The mode to open the log files for this handler is hard-coded to mode="a", which means, it should always append to already existing logs for this day, which works fine as long as I start the scripts manually from shell. 
But as soon as I pack the script with PyInstaller, an already existing file for this day is overwritten when the application starts. Does anybody have an idea why this happens?

Thanks in advance for any advice.
Reply all
Reply to author
Forward
0 new messages