-
Notifications
You must be signed in to change notification settings - Fork 114
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
Disable uvicorn logger to remove duplicated messages #870
Conversation
Signed-off-by: Antony Milne <[email protected]>
Signed-off-by: Antony Milne <[email protected]>
🔥 |
Signed-off-by: Antony Milne <[email protected]>
Signed-off-by: Antony Milne <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Danker. I'm guilty of never reading this log
@AntonyMilneQB although could you help me check if you throw an error in one of the endpoint, does the stack trace get logged correctly? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent
@limdauto Just checked this and it does 👍 All the same log messages get through as before, just they don't get duplicated now. |
Description
Did you ever notice how chatty kedro-viz logging is and that all the messages are duplicated?

Now that we're changing kedro's default logger to something more beautiful in kedro-org/kedro#1512, the duplication is even more stark and makes the output look wack:

The reason for this is that
uvicorn
sets up its own custom logger, and then kedro's logging is also there, so messages get duplicated. The solution is to disableuvicorn
's logger. I left the log level set to what they use (INFO) so that we still get a lot of messages, just they're no longer duplicated.After kedro-org/kedro#1512 and this are merged, kedro viz log messages will then look super sexy, like this:

There's no need to wait until #1512 is merged to merge this though. We can go ahead with this right away.
Checklist
RELEASE.md
file