From 77c7120854fdf43563ee78f7e3d7f726a82ef52f Mon Sep 17 00:00:00 2001 From: Mackenzie Halliday Date: Wed, 26 Jun 2024 21:58:10 -0400 Subject: [PATCH] Squash #146 - Correct config to os --- notifications_utils/logging.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/notifications_utils/logging.py b/notifications_utils/logging.py index 91526204..6f4fd6fd 100644 --- a/notifications_utils/logging.py +++ b/notifications_utils/logging.py @@ -1,5 +1,6 @@ from email.mime import application import logging +import os import sys from flask import request, g from flask.ctx import has_request_context @@ -44,7 +45,7 @@ def build_statsd_line(extra_fields): def init_app(app, statsd_client=None): - if app.config['NOTIFY_ENVIRONMENT'] == 'production': + if os.environ['NOTIFY_ENVIRONMENT'] == 'production': app.config.setdefault('NOTIFY_LOG_LEVEL', 'INFO') else: app.config.setdefault('NOTIFY_LOG_LEVEL', 'DEBUG')