summaryrefslogtreecommitdiff
path: root/src/server.c
diff options
context:
space:
mode:
authorBinbin <binloveplay1314@qq.com>2023-02-19 22:33:19 +0800
committerGitHub <noreply@github.com>2023-02-19 16:33:19 +0200
commit521e54f551386eaec3e84ddad052add391059e5e (patch)
treedbac88c48791fb08e04353a133fc24f0ad21c722 /src/server.c
parent5b61b0dc6d2579ee484fa6cf29bfac59513f84ab (diff)
downloadredis-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/server.c')
-rw-r--r--src/server.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server.c b/src/server.c
index eaba32f87..5685cce6d 100644
--- a/src/server.c
+++ b/src/server.c
@@ -4175,7 +4175,7 @@ int prepareForShutdown(int flags) {
server.shutdown_flags = flags;
- serverLog(LL_WARNING,"User requested shutdown...");
+ serverLog(LL_NOTICE,"User requested shutdown...");
if (server.supervised_mode == SUPERVISED_SYSTEMD)
redisCommunicateSystemd("STOPPING=1\n");
@@ -4263,7 +4263,7 @@ int finishShutdown(void) {
num_lagging_replicas++;
long lag = replica->replstate == SLAVE_STATE_ONLINE ?
time(NULL) - replica->repl_ack_time : 0;
- serverLog(LL_WARNING,
+ serverLog(LL_NOTICE,
"Lagging replica %s reported offset %lld behind master, lag=%ld, state=%s.",
replicationGetSlaveName(replica),
server.master_repl_offset - replica->repl_ack_off,
@@ -7164,8 +7164,8 @@ int main(int argc, char **argv) {
int background = server.daemonize && !server.supervised;
if (background) daemonize();
- serverLog(LL_WARNING, "oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo");
- serverLog(LL_WARNING,
+ serverLog(LL_NOTICE, "oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo");
+ serverLog(LL_NOTICE,
"Redis version=%s, bits=%d, commit=%s, modified=%d, pid=%d, just started",
REDIS_VERSION,
(sizeof(long) == 8) ? 64 : 32,
@@ -7176,7 +7176,7 @@ int main(int argc, char **argv) {
if (argc == 1) {
serverLog(LL_WARNING, "Warning: no config file specified, using the default config. In order to specify a config file use %s /path/to/redis.conf", argv[0]);
} else {
- serverLog(LL_WARNING, "Configuration loaded");
+ serverLog(LL_NOTICE, "Configuration loaded");
}
initServer();
@@ -7200,7 +7200,7 @@ int main(int argc, char **argv) {
if (!server.sentinel_mode) {
/* Things not needed when running in Sentinel mode. */
- serverLog(LL_WARNING,"Server initialized");
+ serverLog(LL_NOTICE,"Server initialized");
#ifdef __linux__
linuxMemoryWarnings();
sds err_msg = NULL;