From 03b1f0a0bce941c3b84dd99b6e2aa7fb954f949f Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Tue, 26 Dec 2023 12:43:24 +0100 Subject: [PATCH] move logging config to conf.py --- conf.py | 6 ++++++ frontend.py | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/conf.py b/conf.py index 5e2e995..a47a39d 100644 --- a/conf.py +++ b/conf.py @@ -5,6 +5,12 @@ from rtoml import load as toml_load from os import environ +import logging with open(environ["SETTINGS"]) as f: CONFIG = toml_load(f.read()) + +logging.basicConfig( + format="[%(levelname)s %(name)s] %(message)s", + level=logging.INFO, +) diff --git a/frontend.py b/frontend.py index 4c60ecb..fc700ae 100644 --- a/frontend.py +++ b/frontend.py @@ -5,7 +5,6 @@ import socket import tempfile from datetime import datetime -from logging import basicConfig from secrets import token_hex import iso8601 @@ -37,11 +36,6 @@ from ib_hosted import get_scoped_api_key, ib, update_asset_userdata from redis_session import RedisSessionStore -basicConfig( - format="[%(levelname)s %(name)s] %(message)s", - level=logging.INFO, -) - app = Flask(__name__) app.wsgi_app = ProxyFix(app.wsgi_app)