I am trying to use TimedRotatingFileHandler to keep daily logs in separate log files. The rotation works perfectly as intended, but what I don\'t like how it does is the nam
I used solution https://stackoverflow.com/a/25387192/6619512 with Python 3.7 and it is a great solution.
But for 'midnight' when parameter and for when parameter starting with 'W' it did not work since the atTime parameter was introduced and used in the TimedRotatingFileHandler class.
To make use of this solution use the following __init__ line:
def __init__(self, filename, when='h', interval=1, backupCount=0,
encoding=None, delay=False, utc=False, atTime=None, postfix = ".log"):
Also add the following to the content of the __init__ declarations:
self.postfix = postfix