New submission from Alexander Smirnov <alexander.smirn...@gmail.com>:
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" ---------- components: Library (Lib) messages: 398326 nosy: alexander.smirnoff priority: normal severity: normal status: open title: backupCount is not respected in TimedRotatingFileHandler when namer is specified versions: Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44753> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com