From: Vsevolod Stakhov Date: Mon, 9 Apr 2018 09:15:09 +0000 (+0100) Subject: [Minor] Improve ratelimit debugging X-Git-Tag: 1.7.3~14 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1dd3a53d870fe4bccc6f98770e7b2475a7095e6e;p=rspamd.git [Minor] Improve ratelimit debugging --- 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,