From dd9416f73425149db653208ab767cab1481f9d07 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Fri, 25 Nov 2022 20:41:29 +0100 Subject: [PATCH] Print better error message when pygelf cannot be imported --- reframe/core/logging.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reframe/core/logging.py b/reframe/core/logging.py index c0a016cafb..6e3e7c5385 100644 --- a/reframe/core/logging.py +++ b/reframe/core/logging.py @@ -333,7 +333,8 @@ def _create_stream_handler(site_config, config_prefix): def _create_graylog_handler(site_config, config_prefix): try: import pygelf - except ImportError: + except ImportError as err: + getlogger().warning(f'could not import pygelf module: {err}') return None address = site_config.get(f'{config_prefix}/address')