]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Improve logging for ratelimit
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 8 Sep 2016 10:54:03 +0000 (11:54 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 8 Sep 2016 10:54:03 +0000 (11:54 +0100)
src/plugins/lua/ratelimit.lua

index 8acc3edcfb0fd30fddb249347543e52fe5b6ec36..a4a870b09617ee400f75adfd16bdd2e9603a8c2d 100644 (file)
@@ -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