-
-
Notifications
You must be signed in to change notification settings - Fork 754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unfavorable logger name "uvicorn.error" #562
Comments
The intent was to follow gunicorn's "access" vs. "error" logs, although I'd agree. Perhaps we could go with something more like |
Ok, I see. Yes, I think 'error' just as 'warn' and 'info' should exclusively refer to the log level, not the category. |
Same problem here. Please change if possible. |
Sounds sensible to me too! 👍
Speaking for myself here, but I don’t find such remarks very helpful. This is a volunteer-driven and collaborative project, so we shouldn’t put work expectations on others. With that said, as always I’m sure maintainers would be very happy to review any PRs to help resolve this. :) |
I've had similar confusing logs from uvicorn when using tortoise orm with fastapi.
An error shown as INFO doesn't seem logical, an error saying application startup complete is even more confusing. |
I was confused too |
ah I thought I was doing something wrong, good to know others faced the same issue |
Any fix of it? |
@uricholiveira 'uvicorn.error' is just the logger's name. The problem is root logger usage in tortoise orm's FastAPI integration though. |
Hi,
Please help me with the issue |
That's not uvicorn's fault. Some other package or the questioner yourself configured the |
@laggardkernel I agree we should not use the root logger but, IMO, Uvicorn shouldn't repeat the log anyway just because we use the python logging function. Example: I am not using the root logger bu I still see Uvicorn's logs twice, one with my format and another one formated by Uvicorn. |
The original issue here is the logger's name, not the duplication. The latter is not a |
This comment was marked as spam.
This comment was marked as spam.
The thumbs down above are just mean. If you think you've found an issue, and you want to be sure, create a discussion. We're going to do our best to help. Anyway... After @euri10's comment on #1489 (comment) (I also agree with it), I'll be closing this issue. I'll not lock the issue, if someone has good arguments, or a good strategy that can refute the mentioned comment, feel free to say it. Always open to hear what others have to say. ✌️ |
Reopening this, as I want to think if we can have a solution that works for everybody. |
This is nuts.. it's been open since 2020 and we can't even get the name of the logger changed? What on earth... |
Such a bad comment on a volunteer driven project. 🤦♂️ I'm willing to review a PR for this. A start point can be what was already implemented on #1489. The last comment on that PR specifies what is missing to get that done. |
Hello, I was curious if there was any solution to this yet? I have the same issue:
Would you be up for renaming this logger to just |
The only problem I can imagine they have, is that old uses of this may have build operating-system tools around that naming, but it's up to the devs to decide. |
I'm also experiencing this issue with my websocket connections. It's rather difficult to suppress those loglines too. |
|
If the name of the logger is changed,this will be only for startup and shut down logs, right? Will it still print any actual error logs with error level only? |
@ltbd78 sure if you're still keen on this let me know and can give you some pointers. |
Yes, would love to hop on a call if you have time this weekend to see what I can contribute. Would the following logger names be okay? uvicorn.server |
https://github.com/encode/uvicorn/blob/master/uvicorn/protocols/websockets/websockets_impl.py
Every time a new websocket request comes in something like this appears in the logs:
This is slightly confusing since it is in fact not an error. What's the purpose of naming it uvicorn.error ? We noticed this when ossec kept triggering on every incoming request spamming us with false alarms.
There are other questionable occurences like
Important
The text was updated successfully, but these errors were encountered: