Support disabling logs #15
Replies: 2 comments 1 reply
-
This would be funny if it weren't so sad. FastAPI positions itself as a high-performance framework, but its nice ‘rich’ output cannot be disabled or redirected to a file (or null) in Windows.
With one line
|
Beta Was this translation helpful? Give feedback.
-
I am having some trouble with this subject too. I have an implementation that is based on this gist, and after changing to use What I want to do is basically the same that I was doing with unicorn using the lines bellow: logging.getLogger("uvicorn.access").handlers.clear()
logging.getLogger("uvicorn.access").propagate = False Does anyone know if this is possible? |
Beta Was this translation helpful? Give feedback.
-
First Check
Commit to Help
Example Code
Description
Hello,
I would like to be able to disable the CLI's logs, mostly the panels when it starts.
The cherry-on-top would be to be able to disable uvicorn's logs too ("Uvicorn running on ...").
Ideally it could be configured with environment variables.
Thank you
Operating System
macOS
Operating System Details
14.4.1 on M3 Max
Python Version
3.12.3
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions