aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/lua_redis.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-07-19 16:51:53 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-07-19 16:51:53 +0100
commita6ff2b45b4f0becd0ef3322f19f62224f4a6dea9 (patch)
treeb1556f2c5740761764603ef96af1817b27637a94 /lualib/lua_redis.lua
parent82c2e609a95d81f8bc18a9595ab96d3200b20d58 (diff)
downloadrspamd-a6ff2b45b4f0becd0ef3322f19f62224f4a6dea9.tar.gz
rspamd-a6ff2b45b4f0becd0ef3322f19f62224f4a6dea9.zip
[Minor] Slightly improve logging
Diffstat (limited to 'lualib/lua_redis.lua')
-rw-r--r--lualib/lua_redis.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/lualib/lua_redis.lua b/lualib/lua_redis.lua
index efecb6a0e..f62ee05bb 100644
--- a/lualib/lua_redis.lua
+++ b/lualib/lua_redis.lua
@@ -1102,14 +1102,16 @@ local function load_script_task(script, task)
opt.callback = function(err, data)
if err then
logger.errx(task, 'cannot upload script to %s: %s; registered from: %s:%s',
- opt.upstream:get_addr(), err, script.caller.short_src, script.caller.currentline)
+ opt.upstream:get_addr():to_string(true),
+ err, script.caller.short_src, script.caller.currentline)
opt.upstream:fail()
script.fatal_error = err
else
opt.upstream:ok()
logger.infox(task,
"uploaded redis script to %s with id %s, sha: %s",
- opt.upstream:get_addr(), script.id, data)
+ opt.upstream:get_addr():to_string(true),
+ script.id, data)
script.sha = data -- We assume that sha is the same on all servers
end
script.in_flight = script.in_flight - 1
@@ -1144,14 +1146,15 @@ local function load_script_taskless(script, cfg, ev_base)
opt.callback = function(err, data)
if err then
logger.errx(cfg, 'cannot upload script to %s: %s; registered from: %s:%s',
- opt.upstream:get_addr(), err, script.caller.short_src, script.caller.currentline)
+ opt.upstream:get_addr():to_string(true),
+ err, script.caller.short_src, script.caller.currentline)
opt.upstream:fail()
script.fatal_error = err
else
opt.upstream:ok()
logger.infox(cfg,
"uploaded redis script to %s with id %s, sha: %s",
- opt.upstream:get_addr(), script.id, data)
+ opt.upstream:get_addr():to_string(true), script.id, data)
script.sha = data -- We assume that sha is the same on all servers
script.fatal_error = nil
end