From 117c578d05b9a7183513d93fb8a82e6493589f77 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 23 Sep 2014 16:30:36 +0100 Subject: [PATCH] Improve logging for pre-result. --- src/lua/lua_task.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c index bc834476b..d91774d1b 100644 --- a/src/lua/lua_task.c +++ b/src/lua/lua_task.c @@ -795,16 +795,17 @@ lua_task_set_pre_result (lua_State * L) mres->score = mres->metric->actions[action].score; } task->pre_result.action = action; - msg_info ("<%s>: set pre-result according to lua pre-filter to %s", - task->message_id, rspamd_action_to_str (action)); if (lua_gettop (L) >= 3) { action_str = rspamd_mempool_strdup (task->task_pool, luaL_checkstring (L, 3)); task->pre_result.str = action_str; } else { - task->pre_result.str = NULL; + task->pre_result.str = "unknown"; } + msg_info ("<%s>: set pre-result to %s: '%s'", + task->message_id, rspamd_action_to_str (action), + task->pre_result.str); } } return 0; -- 2.39.5