From b0e6a8f409369e57c5c287d361e4f5666f1f52b6 Mon Sep 17 00:00:00 2001 From: Mackenzie Halliday Date: Wed, 26 Jun 2024 15:11:50 -0400 Subject: [PATCH] Revert "Squash #146 - try to set log level in get_handler" This reverts commit 95440a5bf9fd97b6b60fc5d361e96703addeda95. --- notifications_utils/logging.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/notifications_utils/logging.py b/notifications_utils/logging.py index af8a5433..dabd24e1 100644 --- a/notifications_utils/logging.py +++ b/notifications_utils/logging.py @@ -43,7 +43,12 @@ def build_statsd_line(extra_fields): def init_app(app, statsd_client=None): - app.config.setdefault('NOTIFY_LOG_LEVEL', 'INFO') + if app.config['NOTIFY_ENVIRONMENT'] == 'production': + app.config.setdefault('NOTIFY_LOG_LEVEL', 'INFO') + else: + app.config.setdefault('NOTIFY_LOG_LEVEL', 'INFO') + breakpoint() + # app.config.setdefault('NOTIFY_LOG_LEVEL', 'INFO') app.config.setdefault('NOTIFY_APP_NAME', 'none') app.config.setdefault('NOTIFY_LOG_PATH', './log/application.log')