From: Andrew Lewis Date: Mon, 21 Nov 2016 17:27:19 +0000 (+0200) Subject: [Minor] Improve replies module logging X-Git-Tag: 1.4.1~112^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=91a96742d37ca1b096b825f7a941b42aa4987e51;p=thirdparty%2Frspamd.git [Minor] Improve replies module logging --- diff --git a/src/plugins/lua/replies.lua b/src/plugins/lua/replies.lua index b5c7c6ada1..6704882e0a 100644 --- a/src/plugins/lua/replies.lua +++ b/src/plugins/lua/replies.lua @@ -41,7 +41,7 @@ end local function replies_check(task) local function redis_get_cb(err, data) if err ~= nil then - rspamd_logger.errx('redis_get_cb received error: %1', err) + rspamd_logger.errx(task, 'redis_get_cb received error: %1', err) return end if data == '1' then @@ -75,14 +75,14 @@ local function replies_check(task) ) if not ret then - rspamd_logger.errx("redis request wasn't scheduled") + rspamd_logger.errx(task, "redis request wasn't scheduled") end end local function replies_set(task) local function redis_set_cb(err) if err ~=nil then - rspamd_logger.errx('redis_set_cb received error: %1', err) + rspamd_logger.errx(task, 'redis_set_cb received error: %1', err) end end -- If sender is unauthenticated return @@ -97,6 +97,7 @@ local function replies_set(task) end -- Create hash of message-id and store to redis local key = make_key(msg_id) + rspamd_logger.infox(task, 'storing message-id for replies check') local ret = rspamd_redis_make_request(task, redis_params, -- connect params key, -- hash key @@ -106,7 +107,7 @@ local function replies_set(task) {key, tostring(settings['expire']), "1"} -- arguments ) if not ret then - rspamd_logger.errx("redis request wasn't scheduled") + rspamd_logger.errx(task, "redis request wasn't scheduled") end end