From 1dd3a53d870fe4bccc6f98770e7b2475a7095e6e Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 9 Apr 2018 10:15:09 +0100 Subject: [PATCH] [Minor] Improve ratelimit debugging --- src/plugins/lua/ratelimit.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/lua/ratelimit.lua b/src/plugins/lua/ratelimit.lua index cf1d6a11e..329bc9095 100644 --- a/src/plugins/lua/ratelimit.lua +++ b/src/plugins/lua/ratelimit.lua @@ -389,8 +389,8 @@ local function ratelimit_cb(task) for pr,value in pairs(prefixes) do local bucket = value.bucket local rate = (1.0 / bucket[1]) / 1000.0 -- Leak rate in messages/ms - rspamd_logger.debugm(N, task, "check limit %s (%s/%s)", - pr, bucket[2], bucket[1]) + rspamd_logger.debugm(N, task, "check limit %s:%s (%s/%s)", + value.name, pr, bucket[2], bucket[1]) lua_redis.exec_redis_script(bucket_check_id, {task = task, is_write = true}, gen_check_cb(pr, bucket, value.name), @@ -434,8 +434,8 @@ local function ratelimit_update_cb(task) end local now = rspamd_util.get_time() now = lua_util.round(now * 1000.0) -- Get milliseconds - rspamd_logger.debugm(N, task, "update limit %s (%s/%s)", - k, bucket[2], bucket[1]) + rspamd_logger.debugm(N, task, "update limit %s:%s (%s/%s)", + v.name, k, bucket[2], bucket[1]) lua_redis.exec_redis_script(bucket_update_id, {task = task, is_write = true}, update_bucket_cb, -- 2.39.5