From 43f2e4225f6557d31104a9af0d5438395d24192c Mon Sep 17 00:00:00 2001 From: Tristan Cacqueray Date: Thu, 5 Dec 2024 10:17:04 -0500 Subject: [PATCH] Fix exception handling formatter This change adds missing formatter to prevent logging exceptions. --- zuul-capacity.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zuul-capacity.py b/zuul-capacity.py index 90f7a56..e60a189 100644 --- a/zuul-capacity.py +++ b/zuul-capacity.py @@ -26,7 +26,7 @@ def get_resources(cloud): try: resources.append(Resource.from_server(server)) except Exception as e: - log.exception("Couldn't get server resource", e, server) + log.exception("Couldn't get server resource %s: %s", server, e) return resources @dataclass @@ -64,7 +64,7 @@ def update_providers_metric(metrics, providers): try: update_provider_metric(metrics, name, provider) except Exception as e: - log.exception("Couldn't get provider", name, e) + log.exception("Couldn't get provider %s: %s", name, e) metrics["error"].labels(cloud=name).inc()