I used tortoise-orm in my sanic app, then I found that the register_tortoise
method use logger.info
, but the log message is not displayed on the console。And I use logger.info
in my code, the message is also not displayed on the console. How I can make the logger.info work?
There have been other reports in the past with logging issues related to tortoise.
Just curious, what logger
instance are you using?
Thanks for replying my question!
from sanic.log import logger
, I used sanic’s logger instance. Also I found that sanic log default config use info
level, why my code didn’t work?
Sanic is using the standard library logging
module. I suppose the question is where are you running it, and where are you hoping/expecting to see the logs? Perhaps there is a misconfiguration with where they logs are being output?