I am developing an app with flask and SQL Alchemy. I need to display the queries executed to generate a page alongside the time each query took for debugging
What\'s the
If you are using your own python logging configuration, you might want to simply set the level of the 'sqlalchemy.engine' logger to 'INFO' in your config.
There are many ways of configuring your python logging, but here is an example using logging.config.dictConfig()
import logging.config
logging.config.dictConfig({
...
'loggers': {
'sqlalchemy.engine': {
'level': 'INFO',
'handlers': ...
}
}
})