Skip to content

Commit

Permalink
Fix exception handling formatter
Browse files Browse the repository at this point in the history
This change adds missing formatter to prevent logging exceptions.
  • Loading branch information
TristanCacqueray committed Dec 5, 2024
1 parent 9611fd4 commit 43f2e42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zuul-capacity.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()


Expand Down

0 comments on commit 43f2e42

Please sign in to comment.