aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-07-18 13:18:27 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-07-18 13:18:27 +0100
commitcdffc67c726572a222dae58144502ec68c8b1359 (patch)
treec1f10b08f8762a902114a0f0e0291a06e1f72ece /src/libstat
parent7bce09dd48c1c493159c10c9694df1437327bd20 (diff)
downloadrspamd-cdffc67c726572a222dae58144502ec68c8b1359.tar.gz
rspamd-cdffc67c726572a222dae58144502ec68c8b1359.zip
[Minor] Add "stat_redis" debug module
Diffstat (limited to 'src/libstat')
-rw-r--r--src/libstat/backends/redis_backend.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libstat/backends/redis_backend.c b/src/libstat/backends/redis_backend.c
index 2a14df469..9664a61a7 100644
--- a/src/libstat/backends/redis_backend.c
+++ b/src/libstat/backends/redis_backend.c
@@ -25,6 +25,12 @@
#include "adapters/libevent.h"
#include "ref.h"
+#define msg_debug_stat_redis(...) rspamd_conditional_debug_fast (NULL, NULL, \
+ rspamd_stat_redis_log_id, "stat_redis", task->task_pool->tag.uid, \
+ G_STRFUNC, \
+ __VA_ARGS__)
+
+INIT_LOG_MODULE(stat_redis)
#define REDIS_CTX(p) (struct redis_stat_ctx *)(p)
#define REDIS_RUNTIME(p) (struct redis_stat_runtime *)(p)
@@ -1084,7 +1090,7 @@ rspamd_redis_connected (redisAsyncContext *c, gpointer r, gpointer priv)
}
rt->learned = val;
- msg_debug_task ("connected to redis server, tokens learned for %s: %uL",
+ msg_debug_stat_redis ("connected to redis server, tokens learned for %s: %uL",
rt->redis_object_expanded, rt->learned);
rspamd_upstream_ok (rt->selected);
}
@@ -1169,7 +1175,7 @@ rspamd_redis_processed (redisAsyncContext *c, gpointer r, gpointer priv)
rspamd_redis_type_to_string (reply->type));
}
- msg_debug_task_check ("received tokens for %s: %d processed, %d found",
+ msg_debug_stat_redis ("received tokens for %s: %d processed, %d found",
rt->redis_object_expanded, processed, found);
rspamd_upstream_ok (rt->selected);
}