From: Vsevolod Stakhov Date: Thu, 22 Aug 2019 16:18:45 +0000 (+0100) Subject: [Minor] Multimap: Add more debugging X-Git-Tag: 2.0~357 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d2a91c67f95d1ded1ff655f0d5416ed9ffe88225;p=rspamd.git [Minor] Multimap: Add more debugging --- diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua index f0f1ec719..da8ab01e3 100644 --- a/src/plugins/lua/multimap.lua +++ b/src/plugins/lua/multimap.lua @@ -624,11 +624,15 @@ local function multimap_callback(task, rule) end end - if r['filter'] or r['type'] == 'url' then - local fn = multimap_filters[r['type']] + if r.filter or r.type == 'url' then + local fn = multimap_filters[r.type] if fn then - value = fn(task, r['filter'], value, r) + + local filtered_value = fn(task, r.filter, value, r) + lua_util.debugm(N, task, 'apply filter %s for rule %s: %s -> %s', + r.filter, r.symbol, value, filtered_value) + value = filtered_value end end