Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing broken log rotation #36

Merged
merged 1 commit into from
Nov 17, 2020
Merged

Fixing broken log rotation #36

merged 1 commit into from
Nov 17, 2020

Conversation

ptoulouse
Copy link
Contributor

Fixes #32.

min(config["logging"]["maxsize"], 0) always returns 0. Passing maxBytes=0 to logging.handlers.RotatingFileHandler means that we want to turn off Log rotation.

By replacing min by max, if maxisize is 0 or a negative value, log rotation will be disabled, while providing a positive value will set the maximum log size.

@Chronial Chronial merged commit 68a03ce into Chronial:master Nov 17, 2020
@Chronial
Copy link
Owner

thx ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

min or max for max_log_size
2 participants