Make logging configurable
This commit is contained in:
parent
c45e514bfc
commit
a5e32526cc
3
app.py
3
app.py
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue