From 4f92263791e5d93936613e1b659e1865b35e9363 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Thu, 6 Jun 2024 18:52:34 +0200 Subject: [PATCH] Trivial: log traceback on an unexpected error Otherwise, it's way too hard to guess what went wrong. Change-Id: I15ea8182c7699294c654dd3d61c5b7d0b4f4f8e5 --- ironic_prometheus_exporter/app/exporter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ironic_prometheus_exporter/app/exporter.py b/ironic_prometheus_exporter/app/exporter.py index c896dfe..ceb15cb 100644 --- a/ironic_prometheus_exporter/app/exporter.py +++ b/ironic_prometheus_exporter/app/exporter.py @@ -30,7 +30,7 @@ def prometheus_metrics(): config.read(os.environ.get('IRONIC_CONFIG')) DIR = config['oslo_messaging_notifications']['location'] except Exception: - LOG.error('Unexpected error') + LOG.exception('Unexpected error') abort(500) all_files = [os.path.join(DIR, name) for name in os.listdir(DIR)