diff options
author | Binbin <binloveplay1314@qq.com> | 2023-02-19 22:33:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-19 16:33:19 +0200 |
commit | 521e54f551386eaec3e84ddad052add391059e5e (patch) | |
tree | dbac88c48791fb08e04353a133fc24f0ad21c722 /src/sentinel.c | |
parent | 5b61b0dc6d2579ee484fa6cf29bfac59513f84ab (diff) | |
download | redis-521e54f551386eaec3e84ddad052add391059e5e.tar.gz |
Demoting some of the non-warning messages to notice (#10715)
We have cases where we print information (might be important but by
no means an error indicator) with the LL_WARNING level.
Demoting these to LL_NOTICE:
- oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
- User requested shutdown...
This is also true for cases that we encounter a rare but normal situation.
Demoting to LL_NOTICE. Examples:
- AOF was enabled but there is already another background operation. An AOF background was scheduled to start when possible.
- Connection with master lost.
base on yoav-steinberg's https://github.com/redis/redis/pull/10650#issuecomment-1112280554
and yossigo's https://github.com/redis/redis/pull/10650#pullrequestreview-967677676
Diffstat (limited to 'src/sentinel.c')
-rw-r--r-- | src/sentinel.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sentinel.c b/src/sentinel.c index 5057cc134..54e1eff82 100644 --- a/src/sentinel.c +++ b/src/sentinel.c @@ -540,7 +540,7 @@ void sentinelIsRunning(void) { } /* Log its ID to make debugging of issues simpler. */ - serverLog(LL_WARNING,"Sentinel ID is %s", sentinel.myid); + serverLog(LL_NOTICE,"Sentinel ID is %s", sentinel.myid); /* We want to generate a +monitor event for every configured master * at startup. */ @@ -3950,7 +3950,7 @@ NULL addReplyError(c,"-NOGOODSLAVE No suitable replica to promote"); return; } - serverLog(LL_WARNING,"Executing user requested FAILOVER of '%s'", + serverLog(LL_NOTICE,"Executing user requested FAILOVER of '%s'", ri->name); sentinelStartFailover(ri); ri->flags |= SRI_FORCE_FAILOVER; @@ -4585,7 +4585,7 @@ void sentinelReceiveIsMasterDownReply(redisAsyncContext *c, void *reply, void *p * replied with a vote. */ sdsfree(ri->leader); if ((long long)ri->leader_epoch != r->element[2]->integer) - serverLog(LL_WARNING, + serverLog(LL_NOTICE, "%s voted for %s %llu", ri->name, r->element[1]->str, (unsigned long long) r->element[2]->integer); @@ -4900,7 +4900,7 @@ int sentinelStartFailoverIfNeeded(sentinelRedisInstance *master) { ctime_r(&clock,ctimebuf); ctimebuf[24] = '\0'; /* Remove newline. */ master->failover_delay_logged = master->failover_start_time; - serverLog(LL_WARNING, + serverLog(LL_NOTICE, "Next failover delay: I will not start a failover before %s", ctimebuf); } |