Skip to content

Commit

Permalink
CustomVarRendererHook: Log an exception's message and location
Browse files Browse the repository at this point in the history
fixes #5258
  • Loading branch information
nilmerg committed Nov 4, 2024
1 parent eef276b commit 8f1eaf0
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand All @@ -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;
}

Expand Down

0 comments on commit 8f1eaf0

Please sign in to comment.