@@ -262,7 +262,7 @@ def __init__(
262262 self ._ws_disconnected = asyncio .Event ()
263263 self ._rx_task : asyncio .Task [None ] | None = None
264264 self ._logger = logger = new_logger (type (self ).__name__ )
265- logger .update_context (log_context )
265+ logger .update_context (log_context , ws_url = ws_url )
266266 self ._mux = MultiplexingManager (logger )
267267
268268 async def connect (self ) -> bool :
@@ -294,7 +294,7 @@ def disconnect_threadsafe(self) -> None:
294294 task_manager .run_coroutine_threadsafe (self .disconnect ()).result ()
295295
296296 async def _logged_ws_handler (self ) -> None :
297- self ._logger .info ("Websocket handling task started" )
297+ self ._logger .debug ("Websocket handling task started" )
298298 try :
299299 await self ._handle_ws ()
300300 except (asyncio .CancelledError , GeneratorExit ):
@@ -306,7 +306,7 @@ async def _logged_ws_handler(self) -> None:
306306 # Ensure connections attempt are unblocked even if the
307307 # background async task errors out completely
308308 self ._connection_attempted .set ()
309- self ._logger .info ("Websocket task terminated" )
309+ self ._logger .debug ("Websocket task terminated" )
310310
311311 async def _handle_ws (self ) -> None :
312312 assert self ._task_manager .check_running_in_task_loop ()
@@ -330,12 +330,12 @@ def _clear_task_state() -> None:
330330 if not await self ._authenticate ():
331331 return
332332 self ._connection_attempted .set ()
333- self ._logger .info (f "Websocket session established ( { self . _ws_url } ) " )
333+ self ._logger .info ("Websocket session established" )
334334 # Task will run until message reception fails or is cancelled
335335 try :
336336 await self ._receive_messages ()
337337 finally :
338- self ._logger .info ("Websocket demultiplexing task terminated." )
338+ self ._logger .debug ("Websocket demultiplexing task terminated." )
339339 # Notify foreground thread of background thread termination
340340 # (this covers termination due to link failure)
341341 await self .notify_client_termination ()
0 commit comments