Log filter result.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 3 Oct 2008 20:31:33 +0000 (22:31 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 3 Oct 2008 20:31:33 +0000 (22:31 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
postlicyd/main-postlicyd.c

index 60ecb3a..cfe2c56 100644 (file)
@@ -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 {