Make logging configurable

This commit is contained in:
Peter J. Holzer 2022-12-08 14:17:19 +01:00
parent c45e514bfc
commit a5e32526cc
1 changed files with 2 additions and 1 deletions

3
app.py
View File

@ -1,6 +1,7 @@
import datetime import datetime
import email.message import email.message
import logging import logging
import logging.config
import os import os
import smtplib import smtplib
@ -14,7 +15,7 @@ from flask import (
import config 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 = Flask(__name__)
app.secret_key = config.secret_key app.secret_key = config.secret_key