Skip to content

Commit

Permalink
logging.conf: avoid empty file creation
Browse files Browse the repository at this point in the history
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)`
  • Loading branch information
scottstanie authored May 26, 2021
1 parent 673dc04 commit 6fdfd13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions defaults/logging/logging.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6fdfd13

Please sign in to comment.