commit f294479: [Fix] Fix logging issue

Vsevolod Stakhov vsevolod at highsecure.ru
Thu Feb 27 15:42:07 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-02-27 15:36:53 +0000
URL: https://github.com/rspamd/rspamd/commit/f294479f789d43eda71d330a81af8bb2fd147603 (HEAD -> master)

[Fix] Fix logging issue

---
 src/plugins/lua/neural.lua | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/plugins/lua/neural.lua b/src/plugins/lua/neural.lua
index 9fcb2d886..1897f0843 100644
--- a/src/plugins/lua/neural.lua
+++ b/src/plugins/lua/neural.lua
@@ -508,13 +508,12 @@ local function ann_push_task_result(rule, task, verdict, score, set)
           })
     else
       lua_util.debugm(N, task,
-          'do not push data to key %s: train condition not satisfied; reason: not checked existing ANNs',
-          set.ann.redis_key)
+          'do not push data: train condition not satisfied; reason: not checked existing ANNs')
     end
   else
     lua_util.debugm(N, task,
         'do not push data to key %s: train condition not satisfied; reason: %s',
-        set.ann.redis_key,
+        (set.ann or {}).redis_key,
         skip_reason)
   end
 end


More information about the Commits mailing list