X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/waydroid.git/blobdiff_plain/8ab936105a9c39fccb0fbac7e2b038c6ed5f245b..4bc3b0f47cc956e2a311e90279af9aa5b8039403:/tools/helpers/logging.py 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)