aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-03-09 13:09:52 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-03-09 13:09:52 +0000
commitd623ed249bfd924bbf08df446f4542d7b30218ce (patch)
tree8d822a6452457535db0ddc2a2384ee9dc2dc90fc /src
parentce34e87a1f86ed33e0653f4d6f55bfea9ee3e93d (diff)
downloadrspamd-d623ed249bfd924bbf08df446f4542d7b30218ce.tar.gz
rspamd-d623ed249bfd924bbf08df446f4542d7b30218ce.zip
[Minor] Fuzzy_backend_redis: Improve logging
Diffstat (limited to 'src')
-rw-r--r--src/libserver/fuzzy_backend/fuzzy_backend_redis.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/libserver/fuzzy_backend/fuzzy_backend_redis.c b/src/libserver/fuzzy_backend/fuzzy_backend_redis.c
index e87ee29d9..32f03cfe2 100644
--- a/src/libserver/fuzzy_backend/fuzzy_backend_redis.c
+++ b/src/libserver/fuzzy_backend/fuzzy_backend_redis.c
@@ -486,7 +486,9 @@ rspamd_fuzzy_backend_check_shingles (struct rspamd_fuzzy_redis_session *session)
if (redisAsyncCommandArgv (session->ctx, rspamd_fuzzy_redis_shingles_callback,
session, session->nargs,
(const gchar **)session->argv, session->argv_lens) != REDIS_OK) {
- msg_err ("cannot execute redis command: %s", session->ctx->errstr);
+ msg_err ("cannot execute redis command on %s: %s",
+ rspamd_inet_address_to_string_pretty (rspamd_upstream_addr_cur (session->up)),
+ session->ctx->errstr);
if (session->callback.cb_check) {
memset (&rep, 0, sizeof (rep));
@@ -579,7 +581,9 @@ rspamd_fuzzy_redis_check_callback (redisAsyncContext *c, gpointer r,
}
if (c->errstr) {
- msg_err_redis_session ("error getting hashes: %s", c->errstr);
+ msg_err_redis_session ("error getting hashes on %s: %s",
+ rspamd_inet_address_to_string_pretty (rspamd_upstream_addr_cur (session->up)),
+ c->errstr);
}
rspamd_upstream_fail (session->up, FALSE, strerror (errno));
@@ -718,7 +722,9 @@ rspamd_fuzzy_redis_count_callback (redisAsyncContext *c, gpointer r,
}
if (c->errstr) {
- msg_err_redis_session ("error getting count: %s", c->errstr);
+ msg_err_redis_session ("error getting count on %s: %s",
+ rspamd_inet_address_to_string_pretty (rspamd_upstream_addr_cur (session->up)),
+ c->errstr);
}
rspamd_upstream_fail (session->up, FALSE, strerror (errno));
@@ -841,7 +847,9 @@ rspamd_fuzzy_redis_version_callback (redisAsyncContext *c, gpointer r,
}
if (c->errstr) {
- msg_err_redis_session ("error getting version: %s", c->errstr);
+ msg_err_redis_session ("error getting version on %s: %s",
+ rspamd_inet_address_to_string_pretty (rspamd_upstream_addr_cur (session->up)),
+ c->errstr);
}
rspamd_upstream_fail (session->up, FALSE, strerror (errno));
@@ -1331,7 +1339,9 @@ rspamd_fuzzy_redis_update_callback (redisAsyncContext *c, gpointer r,
}
if (c->errstr) {
- msg_err_redis_session ("error sending update to redis: %s", c->errstr);
+ msg_err_redis_session ("error sending update to redis %s: %s",
+ rspamd_inet_address_to_string_pretty (rspamd_upstream_addr_cur (session->up)),
+ c->errstr);
}
rspamd_upstream_fail (session->up, FALSE, strerror (errno));