From a5e32526cc9a656decd60f5fb412df716f3b3f33 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Thu, 8 Dec 2022 14:17:19 +0100 Subject: [PATCH] Make logging configurable --- app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 2ba09e5..08bc5c3 100644 --- a/app.py +++ b/app.py @@ -1,6 +1,7 @@ import datetime import email.message import logging +import logging.config import os import smtplib @@ -14,7 +15,7 @@ from flask import ( import config -logging.basicConfig(format="%(asctime)s %(levelname)s %(name)s %(lineno)d | %(message)s", level=logging.DEBUG) +logging.config.dictConfig(config.logging) app = Flask(__name__) app.secret_key = config.secret_key