From d2a91c67f95d1ded1ff655f0d5416ed9ffe88225 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 22 Aug 2019 17:18:45 +0100 Subject: [PATCH] [Minor] Multimap: Add more debugging --- src/plugins/lua/multimap.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 -- 2.39.5