redis_key, tostring(options['expire'])
})
else
- rspamd_logger.err(task, 'got error while connecting to redis')
+ rspamd_logger.errx(task, 'got error while connecting to redis')
end
end
end
{key, tostring(options.expire)} -- arguments
)
if not ret then
- rspamd_logger.err('got error connecting to redis')
+ rspamd_logger.errx(task, 'got error connecting to redis')
end
end
end
{key, 'version', 'data', 'spam', 'ham'} -- arguments
)
if not ret then
- rspamd_logger.err(task, 'got error connecting to redis')
+ rspamd_logger.errx(task, 'got error connecting to redis')
end
end
{key, 'version'} -- arguments
)
if not ret then
- rspamd_logger.err(task, 'got error connecting to redis')
+ rspamd_logger.errx(task, 'got error connecting to redis')
end
end
conn:add_cmd('HINCRBY', {key, 'ham', 1})
end
else
- rspamd_logger.err(task, 'got error connecting to redis')
+ rspamd_logger.errx(task, 'got error connecting to redis')
end
end
if _err then
rspamd_logger.errx(rspamd_config, 'cannot invalidate ANN %s from redis: %s', id, _err)
elseif type(_data) == 'string' then
- rspamd_logger.info(rspamd_config, 'invalidated ANN %s from redis: %s', id, _err)
+ rspamd_logger.infox(rspamd_config, 'invalidated ANN %s from redis: %s', id, _err)
fanns[id].version = 0
end
end
{body_key, meta_key} -- arguments
)
if not ret then
- rspamd_logger.err(task, 'cannot make redis request to check results')
+ rspamd_logger.errx(task, 'cannot make redis request to check results')
end
end
meta_key, tostring(settings['expire'])
})
else
- rspamd_logger.err(task, 'got error while connecting to redis')
+ rspamd_logger.errx(task, 'got error while connecting to redis')
end
elseif do_greylisting or do_greylisting_required then
local t = tostring(math.floor(rspamd_util.get_time()))
meta_key, tostring(settings['expire']), t
})
else
- rspamd_logger.err(task, 'got error while connecting to redis')
+ rspamd_logger.errx(task, 'got error while connecting to redis')
end
else
if action ~= 'no action' and action ~= 'reject' then
redis_args -- arguments
)
if not ret then
- rspamd_logger.err(task, 'error connecting to redis')
+ rspamd_logger.errx(task, 'error connecting to redis')
return
end
args -- arguments
)
if not ret then
- rspamd_logger.err(task, 'error connecting to redis')
+ rspamd_logger.errx(task, 'error connecting to redis')
end
end
end
{channel, data} -- arguments
)
if not ret then
- rspamd_logger.err(task, 'error connecting to redis')
+ rspamd_logger.errx(task, 'error connecting to redis')
end
end
if url then
local function validate_metrics(settings_metrics)
if type(settings_metrics) ~= 'table' or #settings_metrics == 0 then
- logger.err('No metrics specified for collection')
+ logger.errx(rspamd_config, 'No metrics specified for collection')
return false
end
for _, v in ipairs(settings_metrics) do
local function configure_metric_exporter()
local opts = rspamd_config:get_all_opt('metric_exporter')
if not backends[opts['backend']] then
- logger.err('Backend is invalid or unspecified')
+ logger.errx(rspamd_config, 'Backend is invalid or unspecified')
return false
end
for k, v in pairs(opts) do
{key, tostring(settings.expire_novalid), '0'} -- arguments
)
if not ret then
- rspamd_logger.err(task, 'got error connecting to redis')
+ rspamd_logger.errx(task, 'got error connecting to redis')
end
else
local valid_mx = {}
{key, tostring(settings.expire), table.concat(valid_mx, ';')} -- arguments
)
if not ret then
- rspamd_logger.err(task, 'error connecting to redis')
+ rspamd_logger.errx(task, 'error connecting to redis')
end
end
end
fun.totable(fun.map(function(l) return l[2] end, args)) -- arguments
)
if not ret then
- rspamd_logger.err(task, 'got error connecting to redis')
+ rspamd_logger.errx(task, 'got error connecting to redis')
end
end
conn:add_cmd('setex', v)
end, fun.drop_n(1, values))
else
- rspamd_logger.err(task, 'got error while connecting to redis')
+ rspamd_logger.errx(task, 'got error while connecting to redis')
end
end
end
fun.totable(fun.map(function(l) return l[2] end, args)) -- arguments
)
if not ret then
- rspamd_logger.err(task, 'got error connecting to redis')
+ rspamd_logger.errx(task, 'got error connecting to redis')
end
end