Skip to content

Commit 4b241e0

Browse files
logging
1 parent 52762b6 commit 4b241e0

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
66
[Semantic Versioning](http://semver.org/).
77

88
## 1.33.0.dev (development stage/unreleased/unstable)
9+
### Added
10+
- Logging websockets version on start up (logging level: INFO)
911
### Changed
1012
- `print_summary()` "most" to "peak".
1113
### Fixed

unicorn_binance_websocket_api/unicorn_binance_websocket_api_manager.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
import time
5858
import uuid
5959
import ujson as json
60+
import websockets
6061

6162

6263
class BinanceWebSocketApiManager(threading.Thread):
@@ -167,10 +168,12 @@ def __init__(self,
167168
threading.Thread.__init__(self)
168169
self.name = "unicorn-binance-websocket-api"
169170
self.version = "1.33.0.dev"
170-
logging.info(f"New instance of {self.get_user_agent()} on {str(platform.system())} {str(platform.release())} "
171-
f"for exchange {exchange} started ...")
171+
logging.info(f"New instance of {self.get_user_agent()} on "
172+
f"{str(platform.system())} {str(platform.release())} for exchange {exchange} started ...")
172173
if disable_colorama is not True:
174+
logging.info(f"Initiating `colorama_{colorama.__version__}`")
173175
colorama.init()
176+
logging.info(f"Using `websockets_{websockets.__version__}`")
174177
if process_stream_data is False:
175178
# no special method to process stream data provided, so we use add_to_stream_buffer:
176179
self.process_stream_data = self.add_to_stream_buffer
@@ -186,7 +189,7 @@ def __init__(self,
186189
else:
187190
# use the provided method to process stream signals:
188191
self.process_stream_signals = process_stream_signals
189-
logging.info(f"Using `process_stream_signals`")
192+
logging.info(f"Using `process_stream_signals` ...")
190193
self.exchange = exchange
191194
if self.exchange == "binance.com":
192195
self.websocket_base_uri = "wss://stream.binance.com:9443/"

0 commit comments

Comments
 (0)