Skip to content

Correctly scope logging #223

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

Merged
merged 1 commit into from
Dec 6, 2021
Merged

Correctly scope logging #223

merged 1 commit into from
Dec 6, 2021

Conversation

kylematoba
Copy link
Contributor

@kylematoba kylematoba commented Dec 5, 2021

PR Details

Correctly scope loggers so that it plays nicely with others.

Description

logger = logging.getLogger(__name__) then replace every call to the root logger with logger.

Related Issue

#164

Motivation and Context

How Has This Been Tested

Ran my code to consume websockets with logging.getLogger("unicorn_binance_websocket_api.unicorn_binance_websocket_api_manager").setLevel(logging.WARNING) and got the level of chattiness I wanted.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the
    CONTRIBUTING
    document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov-commenter
Copy link

Codecov Report

Merging #223 (a4ba5c3) into master (5bddc94) will increase coverage by 0.35%.
The diff coverage is 71.08%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #223      +/-   ##
==========================================
+ Coverage   89.25%   89.60%   +0.35%     
==========================================
  Files           7        7              
  Lines        1573     1578       +5     
==========================================
+ Hits         1404     1414      +10     
+ Misses        169      164       -5     
Impacted Files Coverage Δ
...ocket_api/unicorn_binance_websocket_api_manager.py 88.27% <67.21%> (+0.08%) ⬆️
...et_api/unicorn_binance_websocket_api_connection.py 97.46% <75.00%> (+5.16%) ⬆️
...socket_api/unicorn_binance_websocket_api_socket.py 91.30% <75.00%> (+0.12%) ⬆️
...et_api/unicorn_binance_websocket_api_restclient.py 94.96% <85.71%> (+0.03%) ⬆️
...et_api/unicorn_binance_websocket_api_restserver.py 100.00% <100.00%> (ø)

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 5bddc94...a4ba5c3. Read the comment docs.

@oliver-zehentleitner oliver-zehentleitner merged commit c057bf6 into oliver-zehentleitner:master Dec 6, 2021
@oliver-zehentleitner
Copy link
Owner

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.

3 participants