aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-04-09 10:15:09 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-04-09 10:15:09 +0100
commit1dd3a53d870fe4bccc6f98770e7b2475a7095e6e (patch)
tree3190adc5bfb8da638c4809676b1d2f02223abe72
parentee2026a65dcab5dbfff2ecb575a05ed592621fee (diff)
downloadrspamd-1dd3a53d870fe4bccc6f98770e7b2475a7095e6e.tar.gz
rspamd-1dd3a53d870fe4bccc6f98770e7b2475a7095e6e.zip
[Minor] Improve ratelimit debugging
-rw-r--r--src/plugins/lua/ratelimit.lua8
1 files 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,