From: Vsevolod Stakhov Date: Thu, 8 Sep 2016 10:54:03 +0000 (+0100) Subject: [Minor] Improve logging for ratelimit X-Git-Tag: 1.4.0~471 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb8c6ae700b80d0664174a331b255668ce449519;p=thirdparty%2Frspamd.git [Minor] Improve logging for ratelimit --- diff --git a/src/plugins/lua/ratelimit.lua b/src/plugins/lua/ratelimit.lua index 8acc3edcfb..a4a870b096 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