-
Notifications
You must be signed in to change notification settings - Fork 94
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
Set uvicorn server log level #217
Conversation
Set graphql uvicorn server log level based on Prefect config.
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.
This seems like a really reasonable fix to me, just some minor nits.
I think it is worth noting that:
- We can disable access logs to Uvicorn without changing the log level, this might be good to add to the config as
server.logging.log_access = false
and pass to Uvicorn - We probably will increase the healthcheck interval because it's pretty fast
Thanks so much for contributing!
Co-authored-by: Michael Adkins <[email protected]>
Co-authored-by: Michael Adkins <[email protected]>
@madkinsz Thank you for the quick review and the I added a In the case of |
You're welcome :) Also, I left this as is before because I didn't think it was a big deal, but when using the config it's nice to use the attribute (
Great point! This would fit better under
I think the rename suggested above will make it clear that you're just disabling it regardless of log level (as in Uvicorn). I don't think we should mutate another config value based on it. |
I see now you are using box. I updated the access pattern as you suggested.
Good suggestion, I updated the code with this. |
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.
Thanks again!
Summary
Set graphql uvicorn server log level based on Prefect config.
Solves #216
Importance
Allows the user to control the access logs of the Prefect GraphQL service (which can become quite large on the default
DEBUG
level).Checklist
This PR:
changes/
directory (if appropriate)