Skip to content

Commit

Permalink
Fix log rotation (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
ptoulouse authored Nov 17, 2020
1 parent 76af6f7 commit 68a03ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion snapraid-runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 68a03ce

Please sign in to comment.