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

Move verbosity filtering to logger #2453

Merged
merged 5 commits into from Jun 16, 2022
Merged

Move verbosity filtering to logger #2453

merged 5 commits into from Jun 16, 2022

Conversation

ahopkins
Copy link
Member

We added verbosity as an option a couple releases ago. This was to help reduce some noise in the logging. It was cumbersome to implement, since you needed to read the value from the application state.

This PR makes the change to add it as an option to the record:

logger.debug("Some message", extra={"verbosity": 2})

@ahopkins ahopkins requested a review from a team as a code owner May 11, 2022 06:25
@codecov
Copy link

codecov bot commented May 11, 2022

Codecov Report

Merging #2453 (09b42f4) into main (b879827) will increase coverage by 0.057%.
The diff coverage is 100.000%.

@@              Coverage Diff              @@
##              main     #2453       +/-   ##
=============================================
+ Coverage   87.189%   87.246%   +0.057%     
=============================================
  Files           60        60               
  Lines         5066      5073        +7     
  Branches       910       907        -3     
=============================================
+ Hits          4417      4426        +9     
  Misses         476       476               
+ Partials       173       171        -2     
Impacted Files Coverage Δ
sanic/app.py 88.740% <100.000%> (-0.022%) ⬇️
sanic/application/state.py 96.202% <100.000%> (+0.098%) ⬆️
sanic/asgi.py 90.000% <100.000%> (+1.570%) ⬆️
sanic/log.py 100.000% <100.000%> (ø)
sanic/touchup/schemes/ode.py 93.650% <100.000%> (-0.196%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b879827...09b42f4. Read the comment docs.

@ahopkins ahopkins merged commit 1668e15 into main Jun 16, 2022
27 checks passed
@ahopkins ahopkins deleted the verbosity branch June 16, 2022 09:35
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.

None yet

1 participant