From: Florent Bruneau Date: Fri, 3 Oct 2008 20:31:33 +0000 (+0200) Subject: Log filter result. X-Git-Url: http://git.madism.org/?a=commitdiff_plain;h=8ad7a11fd6ad8b8f5edfbde9da16a18b7a846738;p=apps%2Fpfixtools.git Log filter result. Signed-off-by: Florent Bruneau --- diff --git a/postlicyd/main-postlicyd.c b/postlicyd/main-postlicyd.c index 60ecb3a..cfe2c56 100644 --- a/postlicyd/main-postlicyd.c +++ b/postlicyd/main-postlicyd.c @@ -88,9 +88,18 @@ static bool policy_process(server_t *pcy, const config_t *config) while (true) { const filter_hook_t *hook = filter_run(filter, query); if (hook == NULL) { - syslog(LOG_WARNING, "request aborted"); + syslog(LOG_WARNING, "request client=%s, from=<%s>, to=<%s>: aborted", + query->client_name, + query->sender == NULL ? "undefined" : query->sender, + query->recipient == NULL ? "undefined" : query->recipient); return false; } else if (hook->postfix) { + syslog(LOG_INFO, "request client=%s, from=<%s>, to=<%s>: " + "awswer %s from filter %s", + query->client_name, + query->sender == NULL ? "undefined" : query->sender, + query->recipient == NULL ? "undefined" : query->recipient, + htokens[hook->type], filter->name); policy_answer(pcy, "%s", hook->value); return true; } else {