aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/plugins/neural.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-02-05 11:42:40 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-02-05 11:42:40 +0000
commitf78a04d718ce147da5cf99e99e59c4e3d4d44146 (patch)
tree35804af09148d66f22c61bcb0bacf7af92763f80 /lualib/plugins/neural.lua
parentbf0f6af14638bfb41d71cb3de630b56d9f14d603 (diff)
downloadrspamd-f78a04d718ce147da5cf99e99e59c4e3d4d44146.tar.gz
rspamd-f78a04d718ce147da5cf99e99e59c4e3d4d44146.zip
[Minor] Neural: Add logging stuff
Diffstat (limited to 'lualib/plugins/neural.lua')
-rw-r--r--lualib/plugins/neural.lua10
1 files changed, 7 insertions, 3 deletions
diff --git a/lualib/plugins/neural.lua b/lualib/plugins/neural.lua
index 433a17ac9..c35fc0eeb 100644
--- a/lualib/plugins/neural.lua
+++ b/lualib/plugins/neural.lua
@@ -655,22 +655,26 @@ local function process_rules_settings()
selt.digest = lua_util.table_digest(selt.symbols)
selt.prefix = redis_ann_prefix(rule, selt.name)
+ rspamd_logger.messagex(rspamd_config,
+ 'use NN prefix for rule %s; settings id "%s"; symbols digest: "%s"',
+ selt.prefix, selt.name, selt.digest)
+
lua_redis.register_prefix(selt.prefix, N,
string.format('NN prefix for rule "%s"; settings id "%s"',
- rule.prefix, selt.name), {
+ selt.prefix, selt.name), {
persistent = true,
type = 'zlist',
})
-- Versions
lua_redis.register_prefix(selt.prefix .. '_\\d+', N,
string.format('NN storage for rule "%s"; settings id "%s"',
- rule.prefix, selt.name), {
+ selt.prefix, selt.name), {
persistent = true,
type = 'hash',
})
lua_redis.register_prefix(selt.prefix .. '_\\d+_spam', N,
string.format('NN learning set (spam) for rule "%s"; settings id "%s"',
- rule.prefix, selt.name), {
+ selt.prefix, selt.name), {
persistent = true,
type = 'list',
})