aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/clustering.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2024-12-12 11:27:36 +0000
committerVsevolod Stakhov <vsevolod@rspamd.com>2024-12-12 11:27:36 +0000
commit3197ce7e6ad44cd4afc0f0013dfc03f8a4deeec8 (patch)
treee45d5b884ed23f7fb303743171edc8ef99ca41ff /src/plugins/lua/clustering.lua
parente48629a9f4049e9dbf0dfb14969543e3c3f66b39 (diff)
downloadrspamd-3197ce7e6ad44cd4afc0f0013dfc03f8a4deeec8.tar.gz
rspamd-3197ce7e6ad44cd4afc0f0013dfc03f8a4deeec8.zip
[Minor] Replace rspamd_logger.debugm with proper lua_util.debugm
Diffstat (limited to 'src/plugins/lua/clustering.lua')
-rw-r--r--src/plugins/lua/clustering.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/lua/clustering.lua b/src/plugins/lua/clustering.lua
index d97bdb97e..a00ea9f43 100644
--- a/src/plugins/lua/clustering.lua
+++ b/src/plugins/lua/clustering.lua
@@ -135,7 +135,7 @@ local function clusterting_filter_cb(task, rule)
end
if not cluster_selector or not source_selector then
- rspamd_logger.debugm(N, task, 'skip rule %s, selectors: source="%s", cluster="%s"',
+ lua_util.debugm(N, task, 'skip rule %s, selectors: source="%s", cluster="%s"',
rule.name, source_selector, cluster_selector)
return
end
@@ -153,7 +153,7 @@ local function clusterting_filter_cb(task, rule)
-- We have seen this element in ham mostly, so subtract average it from the size score
final_score = math.min(1.0, size_score - cluster_score / cur_elts)
end
- rspamd_logger.debugm(N, task,
+ lua_util.debugm(N, task,
'processed rule %s, selectors: source="%s", cluster="%s"; data: %s elts, %s score, %s elt score',
rule.name, source_selector, cluster_selector, cur_elts, total_score, element_score)
if final_score > 0.1 then
@@ -205,7 +205,7 @@ local function clusterting_idempotent_cb(task, rule)
elseif verdict == 'junk' then
score = rule.junk_mult
else
- rspamd_logger.debugm(N, task, 'skip rule %s, verdict=%s',
+ lua_util.debugm(N, task, 'skip rule %s, verdict=%s',
rule.name, verdict)
return
end
@@ -218,7 +218,7 @@ local function clusterting_idempotent_cb(task, rule)
end
if not cluster_selector or not source_selector then
- rspamd_logger.debugm(N, task, 'skip rule %s, selectors: source="%s", cluster="%s"',
+ lua_util.debugm(N, task, 'skip rule %s, selectors: source="%s", cluster="%s"',
rule.name, source_selector, cluster_selector)
return
end
@@ -228,7 +228,7 @@ local function clusterting_idempotent_cb(task, rule)
rspamd_logger.errx(task, 'got error while getting clustering keys %s: %s',
source_selector, err)
else
- rspamd_logger.debugm(N, task, 'set clustering key for %s: %s{%s} = %s',
+ lua_util.debugm(N, task, 'set clustering key for %s: %s{%s} = %s',
source_selector, "unknown error")
end
end