LUCIT-Systems-and-Development / unicorn-binance-websocket-api

A Python SDK by LUCIT to use the Binance Websocket API`s (com+testnet, com-margin+testnet, com-isolated_margin+testnet, com-futures+testnet, com-coin_futures, us, tr, dex/chain+testnet) in a simple, fast, flexible, robust and fully-featured way.
https://unicorn-binance-websocket-api.docs.lucit.tech/
Other
677 stars 166 forks source link

Correctly scope logging #223

Closed kylematoba closed 2 years ago

kylematoba commented 2 years ago

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

Checklist

codecov-commenter commented 2 years ago

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%) :arrow_up:
...et_api/unicorn_binance_websocket_api_connection.py 97.46% <75.00%> (+5.16%) :arrow_up:
...socket_api/unicorn_binance_websocket_api_socket.py 91.30% <75.00%> (+0.12%) :arrow_up:
...et_api/unicorn_binance_websocket_api_restclient.py 94.96% <85.71%> (+0.03%) :arrow_up:
...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 commented 2 years ago

Its released: https://github.com/LUCIT-Systems-and-Development/unicorn-binance-websocket-api/releases/tag/1.35.0