[sr-dev] git:master:98805c72: ndb_redis: set message level to debug on reconnect

Victor Seva linuxmaniac at torreviejawireless.org
Fri Nov 27 12:23:39 CET 2020


Module: kamailio
Branch: master
Commit: 98805c723fbe01556e56d5b00ffc686b92014847
URL: https://github.com/kamailio/kamailio/commit/98805c723fbe01556e56d5b00ffc686b92014847

Author: Victor Seva <linuxmaniac at torreviejawireless.org>
Committer: Victor Seva <linuxmaniac at torreviejawireless.org>
Date: 2020-11-27T12:22:52+01:00

ndb_redis: set message level to debug on reconnect

* logging error makes no sense here since there's going
  to be a reconnection afterwards

---

Modified: src/modules/ndb_redis/redis_client.c

---

Diff:  https://github.com/kamailio/kamailio/commit/98805c723fbe01556e56d5b00ffc686b92014847.diff
Patch: https://github.com/kamailio/kamailio/commit/98805c723fbe01556e56d5b00ffc686b92014847.patch

---

diff --git a/src/modules/ndb_redis/redis_client.c b/src/modules/ndb_redis/redis_client.c
index 15a86f7b10..42880310f2 100644
--- a/src/modules/ndb_redis/redis_client.c
+++ b/src/modules/ndb_redis/redis_client.c
@@ -1011,7 +1011,7 @@ int redisc_exec(str *srv, str *res, str *cmd, ...)
 		/* null reply, reconnect and try again */
 		if(rsrv->ctxRedis->err)
 		{
-			LM_ERR("Redis error: %s\n", rsrv->ctxRedis->errstr);
+			LM_DBG("Redis error: %s\n", rsrv->ctxRedis->errstr);
 		}
 		if(redisc_reconnect_server(rsrv)==0)
 		{
@@ -1054,7 +1054,7 @@ int redisc_exec(str *srv, str *res, str *cmd, ...)
 			/* null reply, reconnect and try again */
 			if(rsrv->ctxRedis->err)
 			{
-				LM_ERR("Redis error: %s\n", rsrv->ctxRedis->errstr);
+				LM_DBG("Redis error: %s\n", rsrv->ctxRedis->errstr);
 			}
 			if(redisc_reconnect_server(rsrv)==0)
 			{
@@ -1152,7 +1152,7 @@ redisReply* redisc_exec_argv(redisc_server_t *rsrv, int argc, const char **argv,
 	/* null reply, reconnect and try again */
 	if(rsrv->ctxRedis->err)
 	{
-		LM_ERR("Redis error: %s\n", rsrv->ctxRedis->errstr);
+		LM_DBG("Redis error: %s\n", rsrv->ctxRedis->errstr);
 	}
 
 	if(res)




More information about the sr-dev mailing list