aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-02-17 13:09:33 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-02-17 13:09:33 +0000
commit361fb6df11468548eb57856dad2e74b082dd7085 (patch)
treecd6b4cd9d070f3c9338851ac8e43d0785f694437
parent8b18feb6bc086a9ae7f2eef31f78325221707476 (diff)
downloadrspamd-361fb6df11468548eb57856dad2e74b082dd7085.tar.gz
rspamd-361fb6df11468548eb57856dad2e74b082dd7085.zip
[Minor] Log fuzzy command when processing changes
Issue: #1267
-rw-r--r--src/plugins/fuzzy_check.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c
index 1804e8648..38456f4ca 100644
--- a/src/plugins/fuzzy_check.c
+++ b/src/plugins/fuzzy_check.c
@@ -1959,6 +1959,7 @@ fuzzy_controller_io_callback (gint fd, short what, void *arg)
return_finished
} ret = return_want_more;
guint i, nreplied;
+ const gchar *op = "process";
task = session->task;
@@ -2005,9 +2006,17 @@ fuzzy_controller_io_callback (gint fd, short what, void *arg)
ftype = "txt";
}
+ if (io->cmd.cmd == FUZZY_WRITE) {
+ op = "added";
+ }
+ else if (io->cmd.cmd == FUZZY_DEL) {
+ op = "deleted";
+ }
+
if (rep->prob > 0.5) {
- msg_info_task ("processed fuzzy hash (%s) %*xs, list: %s:%d for "
- "message <%s>",
+ msg_info_task ("%s fuzzy hash (%s) %*xs, list: %s:%d for "
+ "message <%s>",
+ op,
ftype,
(gint)sizeof (cmd->digest), cmd->digest,
symbol,
@@ -2015,10 +2024,11 @@ fuzzy_controller_io_callback (gint fd, short what, void *arg)
session->task->message_id);
}
else {
- msg_info_task ("cannot process fuzzy hash (%s) for message "
+ msg_info_task ("fuzzy hash (%s) for message cannot be %s"
"<%s>, %*xs, "
"list %s:%d, error: %d",
ftype,
+ op,
session->task->message_id,
(gint)sizeof (cmd->digest), cmd->digest,
symbol,