From 8f1eaf0c7bb37d5e530baad41431b8aa89094dc8 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 4 Nov 2024 16:19:44 +0100 Subject: [PATCH] CustomVarRendererHook: Log an exception's message and location fixes #5258 --- .../library/Monitoring/Hook/CustomVarRendererHook.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Hook/CustomVarRendererHook.php b/modules/monitoring/library/Monitoring/Hook/CustomVarRendererHook.php index 6895337115..e4dae64d9b 100644 --- a/modules/monitoring/library/Monitoring/Hook/CustomVarRendererHook.php +++ b/modules/monitoring/library/Monitoring/Hook/CustomVarRendererHook.php @@ -65,7 +65,8 @@ final public static function prepareForObject(MonitoredObject $object) $hooks[] = $hook; } } catch (Exception $e) { - Logger::error('Failed to load hook %s:', get_class($hook), $e); + Logger::error('Failed to load hook %s: %s', get_class($hook), $e); + Logger::debug($e); } } @@ -81,7 +82,8 @@ final public static function prepareForObject(MonitoredObject $object) $renderedValue = $hook->renderCustomVarValue($key, $value); $group = $hook->identifyCustomVarGroup($key); } catch (Exception $e) { - Logger::error('Failed to use hook %s:', get_class($hook), $e); + Logger::error('Failed to use hook %s: %s', get_class($hook), $e); + Logger::debug($e); continue; }