From f3c2c677e8ee0175ae0fd449c2b91b1218da5760 Mon Sep 17 00:00:00 2001 From: Ales Teska Date: Fri, 26 Jan 2024 12:49:06 +0100 Subject: [PATCH] Improved logging so that we know what an exception to capture. --- asab/library/providers/libsreg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asab/library/providers/libsreg.py b/asab/library/providers/libsreg.py index a163658e..6faecaa2 100644 --- a/asab/library/providers/libsreg.py +++ b/asab/library/providers/libsreg.py @@ -161,10 +161,10 @@ async def _periodic_pull(self, event_name): L.error("Failed to download the library.", struct_data={"url": url, 'status': response.status}) except aiohttp.ClientError as e: - L.error("Failed to download the library.", struct_data={"url": url, 'exception': e}) + L.error("Failed to download the library (ClientError).", struct_data={"url": url, 'error': e, 'exception': e.__class__.__name__}) except asyncio.TimeoutError as e: - L.error("Failed to download the library.", struct_data={"url": url, 'exception': e}) + L.error("Failed to download the library (TimeoutError).", struct_data={"url": url, 'error': e, 'exception': e.__class__.__name__}) async def subscribe(self, path):