Skip to content
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

Squash GQL Transport Logs #650

Merged
merged 2 commits into from
Jan 11, 2024
Merged

Squash GQL Transport Logs #650

merged 2 commits into from
Jan 11, 2024

Conversation

nevoodoo
Copy link
Collaborator

@nevoodoo nevoodoo commented Jan 11, 2024

Description

This addresses #540 and allows suppressing gql logging to a less verbose level of WARNING instead of INFO.

Changes Made

  • As per @MattWellie 's suggestion, introduced a log_response argument to query and query_async methods in metamist/graphql/__init__.py, that can be toggled to set the level to WARNING jut for that query execution before setting it to the original level.

Notes

  • I was not able to replicate this locally despite trialing with the logger from gql.transport.[requests | aiohttp] and the logging libraries. Would be nice to test this somehow to see if it works as expected. This should maintain the same functionality as @MattWellie 's fix in theory.

Closes

@codecov-commenter
Copy link

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (674d1f1) 69.72% compared to head (47fdf24) 69.65%.

Files Patch % Lines
metamist/graphql/__init__.py 16.66% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #650      +/-   ##
==========================================
- Coverage   69.72%   69.65%   -0.07%     
==========================================
  Files         121      121              
  Lines        9697     9709      +12     
==========================================
+ Hits         6761     6763       +2     
- Misses       2936     2946      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@illusional illusional left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Squash GQL result logging
3 participants