From 4000cb7d34a1c3cea222dec9e7ef679d8a7798d5 Mon Sep 17 00:00:00 2001 From: Binbin Date: Mon, 2 Aug 2021 16:18:35 +0800 Subject: [PATCH] Modify some error logs printing level. (#9306) 1. In sendBulkToSlave, we used LL_VERBOSE in the past, changed to LL_WARNING. (all the other places that do freeClient(slave) use LL_WARNING) 2. The old style LOG_WARNING, chang it to LL_WARNING. Introduced in an old pr (#1690). --- src/config.c | 2 +- src/replication.c | 2 +- src/server.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config.c b/src/config.c index 099ea0f49..d9b431d0b 100644 --- a/src/config.c +++ b/src/config.c @@ -352,7 +352,7 @@ static int updateOOMScoreAdjValues(sds *args, const char **err, int apply) { if (values[CONFIG_OOM_REPLICA] < values[CONFIG_OOM_MASTER] || values[CONFIG_OOM_BGCHILD] < values[CONFIG_OOM_REPLICA]) { - serverLog(LOG_WARNING, + serverLog(LL_WARNING, "The oom-score-adj-values configuration may not work for non-privileged processes! " "Please consult the documentation."); } diff --git a/src/replication.c b/src/replication.c index 93639fbcd..a0bfdf05f 100644 --- a/src/replication.c +++ b/src/replication.c @@ -1106,7 +1106,7 @@ void sendBulkToSlave(connection *conn) { if (slave->replpreamble) { nwritten = connWrite(conn,slave->replpreamble,sdslen(slave->replpreamble)); if (nwritten == -1) { - serverLog(LL_VERBOSE, + serverLog(LL_WARNING, "Write error sending RDB preamble to replica: %s", connGetLastError(conn)); freeClient(slave); diff --git a/src/server.c b/src/server.c index 1f162a5cd..9138e4756 100644 --- a/src/server.c +++ b/src/server.c @@ -2879,7 +2879,7 @@ int setOOMScoreAdj(int process_class) { fd = open("/proc/self/oom_score_adj", O_WRONLY); if (fd < 0 || write(fd, buf, strlen(buf)) < 0) { - serverLog(LOG_WARNING, "Unable to write oom_score_adj: %s", strerror(errno)); + serverLog(LL_WARNING, "Unable to write oom_score_adj: %s", strerror(errno)); if (fd != -1) close(fd); return C_ERR; }