Reputation: 91
I have a function that makes calls to a logger almost every second, however, I only want to log information an hour before the logfile rotates.
Upvotes: 0
Views: 271
Reputation: 5569
Use logging.handlers.TimedRotatingFileHandler(filename, when='H', interval=1)
Upvotes: 1