From 68a03ced9180fc992630e0fe9379449d07dce2f4 Mon Sep 17 00:00:00 2001 From: Pierre Toulouse <51246205+ptoulouse@users.noreply.github.com> Date: Tue, 17 Nov 2020 03:05:23 -0500 Subject: [PATCH] Fix log rotation (#36) --- snapraid-runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snapraid-runner.py b/snapraid-runner.py index e8aadce..d7051f1 100644 --- a/snapraid-runner.py +++ b/snapraid-runner.py @@ -180,7 +180,7 @@ def setup_logger(): root_logger.addHandler(console_logger) if config["logging"]["file"]: - max_log_size = min(config["logging"]["maxsize"], 0) * 1024 + max_log_size = max(config["logging"]["maxsize"], 0) * 1024 file_logger = logging.handlers.RotatingFileHandler( config["logging"]["file"], maxBytes=max_log_size,