It seems that the Flask side is set by default_handler
of Flask's logger, so you can share it.
my_module.py
from logging import getLogger
logger = getLogger(__name__)
app.py
from logging import DEBUG
from flask.logging import default_handler
import my_module
my_module.logger.setLevel(DEBUG)
my_module.logger.addHandler(default_handler)
app = Flask(__name__)
Ref Logging — Flask Documentation (1.0.x) Logging HOWTO — Python 3.8.1rc1 documentation
Recommended Posts