Don’t get me wrong, they are typically useful. But for for some things, they’re a bit cryptic to me. As in, I don’t know WTH is causing it. At least not at a glance, I can sometimes figure it out if it refers to a specific IP or something like that.
A few examples:
Example 1 - WTH is urllib3.connectionpool? Other entries show e.g. which integration causes it
Logger: urllib3.connectionpool
Source: /usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py:812
First occurred: October 4, 2022 at 13:00:16 (2104 occurrences)
Last logged: 07:58:45
Retrying (Retry(total=5, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7fc59c760e80>, 'Connection to 10.0.21.174 timed out. (connect timeout=3.0)')': /upnp/control/basicevent1
Retrying (Retry(total=5, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPConnectionPool(host='10.0.21.174', port=49153): Read timed out. (read timeout=3.0)")': /upnp/control/insight1
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7fc5a836b700>, 'Connection to 10.0.21.174 timed out. (connect timeout=3.0)')': /upnp/control/insight1
Retrying (Retry(total=5, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7fc59fd6a0b0>, 'Connection to 10.0.21.174 timed out. (connect timeout=3.0)')': /upnp/control/basicevent1
Retrying (Retry(total=5, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7fc59dc5df60>, 'Connection to 10.0.21.174 timed out. (connect timeout=3.0)')': /upnp/control/insight1
And
Example 2 - I can guess that this is probably the WeMo integration by the "Logger" name, but for others this is not so easy
Logger: pywemo.discovery
Source: /usr/local/lib/python3.10/site-packages/pywemo/discovery.py:69
First occurred: October 4, 2022 at 12:59:34 (5 occurrences)
Last logged: 06:15:22
Failed to fetch description http://10.0.21.174:49153/setup.xml
Failed to fetch description http://10.0.21.173:49153/setup.xml
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/urllib3/response.py", line 443, in _error_catcher
yield
File "/usr/local/lib/python3.10/site-packages/urllib3/response.py", line 566, in read
data = self._fp_read(amt) if not fp_closed else b""
File "/usr/local/lib/python3.10/site-packages/urllib3/response.py", line 532, in _fp_read
return self._fp.read(amt) if amt is not None else self._fp.read()
File "/usr/local/lib/python3.10/http/client.py", line 465, in read
s = self.fp.read(amt)
File "/usr/local/lib/python3.10/socket.py", line 705, in readinto
return self._sock.recv_into(b)
TimeoutError: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 816, in generate
yield from self.raw.stream(chunk_size, decode_content=True)
File "/usr/local/lib/python3.10/site-packages/urllib3/response.py", line 627, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/local/lib/python3.10/site-packages/urllib3/response.py", line 565, in read
with self._error_catcher():
File "/usr/local/lib/python3.10/contextlib.py", line 153, in __exit__
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.10/site-packages/urllib3/response.py", line 448, in _error_catcher
raise ReadTimeoutError(self._pool, None, "Read timed out.")
urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='10.0.21.174', port=49153): Read timed out.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/pywemo/discovery.py", line 67, in device_from_description
xml = requests.get(description_url, timeout=REQUESTS_TIMEOUT)
File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 745, in send
r.content
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 899, in content
self._content = b"".join(self.iter_content(CONTENT_CHUNK_SIZE)) or b""
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 822, in generate
raise ConnectionError(e)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='10.0.21.174', port=49153): Read timed out.