Reputation: 1
Issue with Logging Package: File Locking by 'System' Process (PID = 4)
I'm using the logging package in Python, and occasionally the logger fails to perform time-based file rotation at midnight. When I check the Resource Monitor, I see that the process 'System' (PID = 4) has locked my log file (I'm not sure when or for how long this happens).
Is there any way to prevent this file locking? Alternatively, how can I ask the system to release the file handler so my logger can rotate the file as expected?
I know that restart of OS helps, but the restat is not a solution.
Upvotes: 0
Views: 21