Message398326
after adding namer callable (like it is described in https://bugs.python.org/issue43344) to log handler configuration, it stopped removing old files
log_filename = os.path.join(log_dir, "application.log")
log_handler = logging.handlers.TimedRotatingFileHandler(log_filename, when='MIDNIGHT', interval=1, backupCount=7)
// after adding this line, old files are not deleted
log_handler.namer = lambda name: name.replace(".log", "") + ".log" |
|
Date |
User |
Action |
Args |
2021-07-27 22:37:55 | alexander.smirnoff | set | recipients:
+ alexander.smirnoff |
2021-07-27 22:37:55 | alexander.smirnoff | set | messageid: <1627425475.0.0.681821492357.issue44753@roundup.psfhosted.org> |
2021-07-27 22:37:54 | alexander.smirnoff | link | issue44753 messages |
2021-07-27 22:37:54 | alexander.smirnoff | create | |
|