pythonloggingfastapialembicuvicorn

How to disable the logging of Uvicorn?


I am working on FastAPI - Uvicorn. I want to disable the logging by uvicorn. I need only the logs which are logged by the server.

Log file

I referred to this blog and implemented the logging.


Solution

  • You could change log level for getting only needed messages, there are a bunch of possible options:

    uvicorn main:app --log-level critical