I would like to see the debug messages for the libraries/modules that I'm using to be displayed along with the debug messages that are present in my code:
app.logger.debug("Print this")
How do I go about it?
I would like to see the debug messages for the libraries/modules that I'm using to be displayed along with the debug messages that are present in my code:
app.logger.debug("Print this")
How do I go about it?
You could probably use logging.basicConfig but recommended way is to handle loggers individually. Here is example from official documentation:
from logging import getLogger
loggers = [app.logger, getLogger('sqlalchemy'),
getLogger('otherlibrary')]
for logger in loggers:
logger.addHandler(mail_handler)
logger.addHandler(file_handler)
You may be also find interesting this: How to configure all loggers in an application