From 6fdfd1365ec9b1a9acb7059d3f5a62cd7665a743 Mon Sep 17 00:00:00 2001 From: Scott Staniewicz Date: Wed, 26 May 2021 16:37:50 -0500 Subject: [PATCH] logging.conf: avoid empty file creation Keeps the larger size from previous commit, but sets `delay=True` in `RotatingFileHandler` https://docs.python.org/3/library/logging.handlers.html#logging.handlers.RotatingFileHandler Arguments are: `RotatingFileHandler(filename, mode='a', maxBytes=0, backupCount=0, encoding=None, delay=False, errors=None)` --- defaults/logging/logging.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/defaults/logging/logging.conf b/defaults/logging/logging.conf index 1b966fc..8f10b48 100755 --- a/defaults/logging/logging.conf +++ b/defaults/logging/logging.conf @@ -20,8 +20,8 @@ propagate=0 [handler_fileHandler] class=handlers.RotatingFileHandler formatter=simpleFormatter -# Filename, file mode, maximum file size in bytes,number of backups to keep -args=('isce.log','a',1000048576,5) +# Filename, file mode, maximum file size in bytes,number of backups to keep, encoding, delay creation +args=('isce.log','a',1000048576,5,None,True) [handler_consoleHandler] class=StreamHandler