Info level logs have both stdout and stderr #2180
Unanswered
JayYoung2021
asked this question in
Potential Issue
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
https://www.uvicorn.org/#:~:text=Create%20an%20application%3A
I ran the minimal example and got expected result.
1: INFO: Started server process [XXX]
2: INFO: Waiting for application startup.
3: INFO: Application startup complete.
4: INFO: Uvicorn running on http://127.0.0.1:8000/ (Press CTRL+C to quit)
5: INFO: 127.0.0.1:38852 - "GET / HTTP/1.1" 200 OK
6: INFO: 127.0.0.1:38852 - "GET /favicon.ico HTTP/1.1" 404 Not Found
I found that although the levels of these 6 logs are all INFO, lines 1~4 are stderr, while lines 5 and 6 are stdout.
I also checked the code and found that although both types of logs use the .info() method, they use different handlers.
I think that all logs that belong to the level of INFO should handle by only one of stderr or stdout in any scenario. Please correct me if I am wrong in this idea.
Beta Was this translation helpful? Give feedback.
All reactions