Skip to content

Commit 1adf706

Browse files
committed
Fix hook identifier case and improve error logging format in CustomVarsRetrieverHook
1 parent 413d8bc commit 1adf706

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

library/Icingadb/Hook/CustomVarsRetrieverHook.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ final public static function getCustomVarColumns(Model $model): array
1515
{
1616
$columns = [];
1717

18-
$hooks = Hook::all('Icingadb/CustomVarsRetriever');
18+
$hooks = Hook::all('icingadb/CustomVarsRetriever');
1919
foreach ($hooks as $hook) {
2020
try {
2121
$customVars = $hook->retrieveCustomVars($model);
@@ -24,8 +24,9 @@ final public static function getCustomVarColumns(Model $model): array
2424
}
2525
} catch (Throwable $e) {
2626
Logger::error(
27-
'Error retrieving Custom Vars for %s: %s',
28-
$object,
27+
'Error retrieving Custom Vars for %s with table name "%s": %s',
28+
get_class($model),
29+
$model->getTableName(),
2930
$e->getMessage()
3031
);
3132
}

0 commit comments

Comments
 (0)