Log to file when running hooks

Useful if there's some output (to know where it comes from), or in case of
failure.

Signed-off-by: Olivier Brunel <jjk@jjacky.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Olivier Brunel 2016-01-30 15:16:28 +01:00 committed by Allan McRae
parent 7cf5e1aebf
commit a1a8d067e0

View file

@ -737,7 +737,7 @@ int _alpm_hook_run(alpm_handle_t *handle, alpm_hook_when_t when)
for(i = hooks_triggered; i; i = i->next, hook_event.position++) { for(i = hooks_triggered; i; i = i->next, hook_event.position++) {
struct _alpm_hook_t *hook = i->data; struct _alpm_hook_t *hook = i->data;
_alpm_log(handle, ALPM_LOG_DEBUG, "running hook %s\n", hook->name); alpm_logaction(handle, ALPM_CALLER_PREFIX, "running '%s'...\n", hook->name);
hook_event.type = ALPM_EVENT_HOOK_RUN_START; hook_event.type = ALPM_EVENT_HOOK_RUN_START;
hook_event.name = hook->name; hook_event.name = hook->name;