websockets
websockets copied to clipboard
ConnectionRefusedError log spam
This is more of a question than an issue but I'm stuck with this and wanted to ask if you had to face similar situations already.
Your library works well, thanks for that. I am facing some logspam in combination with asyncio when trying to establish a connection and the remote server doesn't answer. I'm using logging utility.
2022-06-23 15:38:03 *** websockets.client[91] INFO ! connect failed again; retrying in 60 seconds
Traceback (most recent call last):
File "/home/***/.local/lib/python3.8/site-packages/websockets/legacy/client.py", line 598, in __aiter__
async with self as protocol:
File "/home/***/.local/lib/python3.8/site-packages/websockets/legacy/client.py", line 633, in __aenter__
return await self
[tons more]
Is there any possibility to catch ConnectionRefusedError: [Errno 111] exceptions and ignore them? logging level is already on INFO .