mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-17 01:54:49 +00:00
plugins, log executed tasks in configute and run. closes https://github.com/opnsense/core/issues/3771
This commit is contained in:
parent
fa6bec1725
commit
b609eed0c7
@ -240,6 +240,10 @@ function plugins_configure($hook, $verbose = false, $args = array())
|
||||
if ($argc > count($args)) {
|
||||
$argc = count($args);
|
||||
}
|
||||
syslog(LOG_NOTICE, sprintf(
|
||||
'plugins_configure %s (execute task : %s(%s))',
|
||||
$hook, $argf, implode(',', array_slice($args, 0, $argc))
|
||||
));
|
||||
call_user_func_array($argf, array_slice($args, 0, $argc));
|
||||
}
|
||||
}
|
||||
@ -253,6 +257,8 @@ function plugins_run($hook, $verbose = false, $args = array())
|
||||
array_unshift($args, $verbose);
|
||||
$ret = [];
|
||||
|
||||
syslog(LOG_NOTICE, sprintf('plugins_run %s (%s)', $hook, implode(',', $args)));
|
||||
|
||||
foreach (plugins_scan() as $name => $path) {
|
||||
try {
|
||||
include_once $path;
|
||||
@ -275,6 +281,9 @@ function plugins_run($hook, $verbose = false, $args = array())
|
||||
if ($argc > count($args)) {
|
||||
$argc = count($args);
|
||||
}
|
||||
syslog(LOG_NOTICE, sprintf(
|
||||
'plugins_run %s (execute task : %s(%s))', $hook, $argf, implode(',', array_slice($args, 0, $argc))
|
||||
));
|
||||
$ret[$name] = call_user_func_array($argf, array_slice($args, 0, $argc));
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user