This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author alexander.smirnoff
Recipients alexander.smirnoff
Date 2021-07-27.22:37:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1627425475.0.0.681821492357.issue44753@roundup.psfhosted.org>
In-reply-to
Content
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"
History
Date User Action Args
2021-07-27 22:37:55alexander.smirnoffsetrecipients: + alexander.smirnoff
2021-07-27 22:37:55alexander.smirnoffsetmessageid: <1627425475.0.0.681821492357.issue44753@roundup.psfhosted.org>
2021-07-27 22:37:54alexander.smirnofflinkissue44753 messages
2021-07-27 22:37:54alexander.smirnoffcreate