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

67 - Add NullHandler to package logger #80

Merged
merged 1 commit into from
Jan 17, 2022
Merged

Conversation

da1910
Copy link
Collaborator

@da1910 da1910 commented Jan 17, 2022

Closes #67

Initializing a logger without a handler can cause warnings, this PR moves the logger into a module and imports it from there. We then configure a NullHandler to avoid the warning being emitted.

@codecov
Copy link

codecov bot commented Jan 17, 2022

Codecov Report

Merging #80 (d449147) into main (9a83910) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #80   +/-   ##
=======================================
  Coverage   90.95%   90.95%           
=======================================
  Files           7        8    +1     
  Lines         829      829           
=======================================
  Hits          754      754           
  Misses         75       75           
Impacted Files Coverage Δ
src/ansys/openapi/common/_logger.py 100.00% <100.00%> (ø)
src/ansys/openapi/common/_oidc.py 74.82% <100.00%> (-0.18%) ⬇️
src/ansys/openapi/common/_session.py 87.28% <100.00%> (-0.08%) ⬇️
src/ansys/openapi/common/_util.py 98.35% <100.00%> (-0.01%) ⬇️

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 9a83910...d449147. Read the comment docs.

Copy link
Contributor

@Andy-Grigg Andy-Grigg left a comment

Choose a reason for hiding this comment

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

Looks good! I can't think of any negatives to having it in a separate module, since loggers are singletons anyway.

@da1910 da1910 merged commit a61ed5a into main Jan 17, 2022
@Andy-Grigg Andy-Grigg deleted the fix/67-add-null-handler branch February 17, 2022 17:07
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.

logger misses null handler
2 participants