diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-12-18 16:39:26 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-12-18 16:39:26 +0000 |
commit | e626098891cc44d4890f186d96aa7a99e4acd124 (patch) | |
tree | 9295c499ea35dc958ff6b0db649d876fd4ecf7e7 /src | |
parent | 0afb0083870f93fd8d68958a5ca2113ad9104db3 (diff) | |
download | rspamd-e626098891cc44d4890f186d96aa7a99e4acd124.tar.gz rspamd-e626098891cc44d4890f186d96aa7a99e4acd124.zip |
Improve logging to avoid confusion
Diffstat (limited to 'src')
-rw-r--r-- | src/libstat/stat_process.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/libstat/stat_process.c b/src/libstat/stat_process.c index e09f72950..57482974d 100644 --- a/src/libstat/stat_process.c +++ b/src/libstat/stat_process.c @@ -301,13 +301,8 @@ preprocess_init_stat_token (gpointer k, gpointer v, gpointer d) if (cl_runtime->clcf->min_tokens > 0 && (guint32)g_tree_nnodes (cbdata->tok->tokens) < cl_runtime->clcf->min_tokens) { /* Skip this classifier */ - msg_debug_task ("<%s> contains less tokens than required for %s classifier: " - "%ud < %ud", cbdata->task->message_id, cl_runtime->clcf->name, - g_tree_nnodes (cbdata->tok->tokens), - cl_runtime->clcf->min_tokens); cur = g_list_next (cur); cl_runtime->skipped = TRUE; - continue; } @@ -750,6 +745,16 @@ rspamd_stat_learn (struct rspamd_task *task, curst = g_list_next (curst); } + if (cl_run->skipped) { + msg_info_task ( + "<%s> contains less tokens than required for %s classifier: " + "%ud < %ud", + task->message_id, + cl_run->clcf->name, + g_tree_nnodes (cl_run->tok->tokens), + cl_run->clcf->min_tokens); + } + if (cl_run->cl && !cl_run->skipped) { cl_ctx = cl_run->cl->init_func (task->task_pool, cl_run->clcf); |