aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/fuzzy_backend
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-03-24 10:56:33 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-03-24 10:56:33 +0000
commit072a4628aaa007b1765b20391f64917dd6b6ff90 (patch)
tree9781cac80106c0cb8e9121369dd3cddd8ed45295 /src/libserver/fuzzy_backend
parentb02be806986889743d919960fab3f89a075e28c5 (diff)
downloadrspamd-072a4628aaa007b1765b20391f64917dd6b6ff90.tar.gz
rspamd-072a4628aaa007b1765b20391f64917dd6b6ff90.zip
[Minor] Add logging
Diffstat (limited to 'src/libserver/fuzzy_backend')
-rw-r--r--src/libserver/fuzzy_backend/fuzzy_backend_redis.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libserver/fuzzy_backend/fuzzy_backend_redis.c b/src/libserver/fuzzy_backend/fuzzy_backend_redis.c
index 08f228f35..6a51831a7 100644
--- a/src/libserver/fuzzy_backend/fuzzy_backend_redis.c
+++ b/src/libserver/fuzzy_backend/fuzzy_backend_redis.c
@@ -113,6 +113,17 @@ rspamd_redis_get_servers (struct rspamd_fuzzy_backend_redis *ctx,
if (lua_type (L, -1) == LUA_TUSERDATA) {
res = *((struct upstream_list **) lua_touserdata (L, -1));
}
+ else {
+ struct lua_logger_trace tr;
+ gchar outbuf[8192];
+
+ memset (&tr, 0, sizeof (tr));
+ lua_logger_out_type (L, -2, outbuf, sizeof (outbuf) - 1, &tr,
+ LUA_ESCAPE_UNPRINTABLE);
+
+ msg_err ("cannot get %s upstreams for Redis fuzzy storage %s; table content: %s",
+ what, ctx->id, outbuf);
+ }
lua_settop (L, 0);