diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-09-08 11:54:03 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-09-08 11:54:03 +0100 |
commit | fb8c6ae700b80d0664174a331b255668ce449519 (patch) | |
tree | 2deae397c9b1fe2805fd44b431fcee9ef15b393c | |
parent | b78acd5b106bebebbf544591e2e2f18256cd1b50 (diff) | |
download | rspamd-fb8c6ae700b80d0664174a331b255668ce449519.tar.gz rspamd-fb8c6ae700b80d0664174a331b255668ce449519.zip |
[Minor] Improve logging for ratelimit
-rw-r--r-- | src/plugins/lua/ratelimit.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/lua/ratelimit.lua b/src/plugins/lua/ratelimit.lua index 8acc3edcf..a4a870b09 100644 --- a/src/plugins/lua/ratelimit.lua +++ b/src/plugins/lua/ratelimit.lua @@ -183,7 +183,11 @@ local function check_limits(task, args) end else if bucket > threshold then - task:set_pre_result('soft reject', 'Ratelimit exceeded') + rspamd_logger.infox(task, + 'ratelimit "%s" exceeded: %s elements with %s limit', + rtype, bucket, threshold) + task:set_pre_result('soft reject', + string.format('Ratelimit "%s" exceeded', rtype)) end end end |