Message 113527 - Python tracker (original) (raw)
The logging module contains a TimedRotatingFileHandler that automaticly rotates the logfile after a specified interval.
This class misses an important feature: it is not possible to specify at what time the file should be rotated, unless that time is midnight.
My usecase: one of our customers works night shifts which means that rotating logfiles at midnight means that files get rotated halfway through a shift instead of at the end of one.
We'd like to be able to specify that logfiles get rotated at a specific time (such as 7:00AM).