From 26559f53042aa00e9122fed3962cbc809731bcbb Mon Sep 17 00:00:00 2001 From: mike cullerton Date: Thu, 16 May 2024 08:42:40 -0400 Subject: [PATCH] add file logging to cr_connect.log --- config/logging.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/config/logging.py b/config/logging.py index 964eabbf..b67b96ab 100644 --- a/config/logging.py +++ b/config/logging.py @@ -3,7 +3,7 @@ logging_config = { 'disable_existing_loggers': False, "loggers": { '': { # root logger - 'handlers': ['console'], + 'handlers': ['console', 'file'], 'level': 'INFO', 'propagate': True }, @@ -36,7 +36,7 @@ logging_config = { "root": { "level": "INFO", "handlers": [ - "console", + "console", "file" ] }, "handlers": { @@ -45,6 +45,12 @@ logging_config = { "class": "logging.StreamHandler", "stream": "ext://sys.stdout", "level": "INFO" + }, + "file": { + "level": "INFO", + "formatter": "simple", + "class": "logging.FileHandler", + "filename": "cr_connect.log" } } }