Great! The performance of fastApi is impressive. I am going to deploy it. And I want to custom a logger. Can I pass it to the app?
Yep, what @Slyfoxy said.
You can get the logger with:
import logging
logger = logging.getLogger("fastapi")
Assuming the original issue was solved, it will be automatically closed now. But feel free to add more comments or create new issues.
Most helpful comment
You can use logger like loguru. It has
InterceptHandlerthat can help you to customize all logs.Also you can see configuration example here