From 5ca57cb3c1bbbd088977497984a47917362ab7fd Mon Sep 17 00:00:00 2001 From: James Lu Date: Sat, 6 Apr 2019 02:20:28 -0700 Subject: [PATCH] Decrease default log file size from 50 MiB to 20 MiB --- example-conf.yml | 4 ++-- log.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/example-conf.yml b/example-conf.yml index 5ac6eeb..a0ede9c 100644 --- a/example-conf.yml +++ b/example-conf.yml @@ -652,8 +652,8 @@ logging: # in the format pylink-commands.log, pylink-commands.log.1, pylink-commands.log.2, etc. # If either max_bytes or backup_count is 0, log rotation will be disabled. - # Max amount of bytes per file, before rotation is done. Defaults to 50 MiB (52428800 bytes). - #max_bytes: 52428800 + # Max amount of bytes per file before rotation is done. Defaults to 20 MiB (20971520 bytes). + #max_bytes: 20971520 # Amount of backups to make. Defaults to 5. #backup_count: 5 diff --git a/log.py b/log.py index 11b5e43..1255751 100644 --- a/log.py +++ b/log.py @@ -53,8 +53,8 @@ def _make_file_logger(filename, level=None): logrotconf = conf.conf.get('logging', {}).get('filerotation', {}) - # Max amount of bytes per file, before rotation is done. Defaults to 50 MiB. - maxbytes = logrotconf.get('max_bytes', 52428800) + # Max amount of bytes per file, before rotation is done. Defaults to 20 MiB. + maxbytes = logrotconf.get('max_bytes', 20971520) # Amount of backups to make (e.g. pylink-debug.log, pylink-debug.log.1, pylink-debug.log.2, ...) # Defaults to 5.