X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/waydroid.git/blobdiff_plain/68dc1d989852f436472f889de4e547cbe269862e..HEAD:/tools/helpers/logging.py?ds=sidebyside 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)