aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2010-09-09 20:36:27 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2010-09-09 20:36:27 +0400
commit94ce619f8a598ea1532c8e63137f74157ac5c9ed (patch)
tree8e4cf0fd762edffc503b327c4f1ee265f9487d9f
parent328516883b740207d86f8a0b618eb62a2170aa97 (diff)
downloadrspamd-94ce619f8a598ea1532c8e63137f74157ac5c9ed.tar.gz
rspamd-94ce619f8a598ea1532c8e63137f74157ac5c9ed.zip
* Write user's name to rspamd log
-rw-r--r--src/protocol.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/protocol.c b/src/protocol.c
index cece0bab7..934dabe05 100644
--- a/src/protocol.c
+++ b/src/protocol.c
@@ -831,6 +831,10 @@ write_check_reply (struct worker_task *task)
cd.log_buf = logbuf;
cd.log_offset = rspamd_snprintf (logbuf, sizeof (logbuf), "id: <%s>, qid: <%s>, ", task->message_id, task->queue_id);
cd.log_size = sizeof (logbuf);
+ if (task->user) {
+ cd.log_offset += rspamd_snprintf (logbuf + cd.log_offset, sizeof (logbuf) - cd.log_offset,
+ "user: %s, ", task->user);
+ }
cd.alive = TRUE;
if (task->proto == SPAMC_PROTO) {
@@ -919,6 +923,10 @@ write_process_reply (struct worker_task *task)
cd.task = task;
cd.log_buf = logbuf;
cd.log_offset = rspamd_snprintf (logbuf, sizeof (logbuf), "id: <%s>, qid: <%s>, ", task->message_id, task->queue_id);
+ if (task->user) {
+ cd.log_offset += rspamd_snprintf (logbuf + cd.log_offset, sizeof (logbuf) - cd.log_offset,
+ "user: %s, ", task->user);
+ }
cd.log_size = sizeof (logbuf);
cd.alive = TRUE;