From 4bc3b0f47cc956e2a311e90279af9aa5b8039403 Mon Sep 17 00:00:00 2001 From: Alessandro Astone Date: Sun, 24 Aug 2025 17:08:08 +0200 Subject: [PATCH] logging: Actually enable logfile rotation backupCount must be set to at least 1 --- tools/helpers/logging.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/helpers/logging.py b/tools/helpers/logging.py index 59627d1..9f3af64 100644 --- a/tools/helpers/logging.py +++ b/tools/helpers/logging.py @@ -71,7 +71,7 @@ def init(args): # Add file log handler if args.action == "container" and not args.details_to_stdout: os.chmod(args.log, 0o644) - handler = RotatingFileHandler(args.log, maxBytes=5*1024*1024) + handler = RotatingFileHandler(args.log, maxBytes=5*1024*1024, backupCount=1) handler.setFormatter(logging.Formatter("(%(process)d) [%(asctime)s] %(message)s", datefmt="%a, %d %b %Y %H:%M:%S")) root_logger.addHandler(handler) -- 2.47.3