From: Alessandro Astone Date: Sun, 24 Aug 2025 15:08:08 +0000 (+0200) Subject: logging: Actually enable logfile rotation X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/waydroid.git/commitdiff_plain/4bc3b0f47cc956e2a311e90279af9aa5b8039403?ds=inline logging: Actually enable logfile rotation backupCount must be set to at least 1 --- 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)