commit 072a462: [Minor] Add logging
Vsevolod Stakhov
vsevolod at highsecure.ru
Tue Mar 24 11:00:08 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-03-24 10:56:33 +0000
URL: https://github.com/rspamd/rspamd/commit/072a4628aaa007b1765b20391f64917dd6b6ff90 (HEAD -> master)
[Minor] Add logging
---
src/libserver/fuzzy_backend/fuzzy_backend_redis.c | 11 +++++++++++
1 file changed, 11 insertions(+)
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);
More information about the Commits
mailing list