mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
hooks: produce less debug output
This commit is contained in:
parent
8f517a588a
commit
11b84deba1
1 changed files with 6 additions and 6 deletions
12
lib/hook.c
12
lib/hook.c
|
@ -90,42 +90,42 @@ int hook_destroy(struct hook *h)
|
|||
|
||||
int hook_start(struct hook *h)
|
||||
{
|
||||
debug(LOG_HOOK, "Running hook %s: type=sart, priority=%d", plugin_name(h->_vt), h->priority);
|
||||
debug(LOG_HOOK | 10, "Running hook %s: type=sart, priority=%d", plugin_name(h->_vt), h->priority);
|
||||
|
||||
return h->_vt->start ? h->_vt->start(h) : 0;
|
||||
}
|
||||
|
||||
int hook_stop(struct hook *h)
|
||||
{
|
||||
debug(LOG_HOOK, "Running hook %s: type=stop, priority=%d", plugin_name(h->_vt), h->priority);
|
||||
debug(LOG_HOOK | 10, "Running hook %s: type=stop, priority=%d", plugin_name(h->_vt), h->priority);
|
||||
|
||||
return h->_vt->stop ? h->_vt->stop(h) : 0;
|
||||
}
|
||||
|
||||
int hook_periodic(struct hook *h)
|
||||
{
|
||||
debug(LOG_HOOK, "Running hook %s: type=periodic, priority=%d", plugin_name(h->_vt), h->priority);
|
||||
debug(LOG_HOOK | 10, "Running hook %s: type=periodic, priority=%d", plugin_name(h->_vt), h->priority);
|
||||
|
||||
return h->_vt->periodic ? h->_vt->periodic(h) : 0;
|
||||
}
|
||||
|
||||
int hook_restart(struct hook *h)
|
||||
{
|
||||
debug(LOG_HOOK, "Running hook %s: type=restart, priority=%d", plugin_name(h->_vt), h->priority);
|
||||
debug(LOG_HOOK | 10, "Running hook %s: type=restart, priority=%d", plugin_name(h->_vt), h->priority);
|
||||
|
||||
return h->_vt->restart ? h->_vt->restart(h) : 0;
|
||||
}
|
||||
|
||||
int hook_read(struct hook *h, struct sample *smps[], size_t *cnt)
|
||||
{
|
||||
debug(LOG_HOOK, "Running hook %s: type=read, priority=%d, cnt=%zu", plugin_name(h->_vt), h->priority, *cnt);
|
||||
debug(LOG_HOOK | 10, "Running hook %s: type=read, priority=%d, cnt=%zu", plugin_name(h->_vt), h->priority, *cnt);
|
||||
|
||||
return h->_vt->read ? h->_vt->read(h, smps, cnt) : 0;
|
||||
}
|
||||
|
||||
int hook_write(struct hook *h, struct sample *smps[], size_t *cnt)
|
||||
{
|
||||
debug(LOG_HOOK, "Running hook %s: type=write, priority=%d, cnt=%zu", plugin_name(h->_vt), h->priority, *cnt);
|
||||
debug(LOG_HOOK | 10, "Running hook %s: type=write, priority=%d, cnt=%zu", plugin_name(h->_vt), h->priority, *cnt);
|
||||
|
||||
return h->_vt->write ? h->_vt->write(h, smps, cnt) : 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue