Skip to content

Commit

Permalink
auto reset log-level to 0 if pika.conf has given an invalid value
Browse files Browse the repository at this point in the history
  • Loading branch information
cheniujh committed Dec 5, 2024
1 parent 6b91375 commit 4b5a58e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pika_conf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ int PikaConf::Load() {

int32_t log_level = 0;
GetConfInt("log-level", &log_level);
if (log_level != 0 && log_level != 1) {
LOG(ERROR) << "log-level loaded from pika.conf is invalid, auto change it to 0";
log_level = 0;
}
log_level_.store(log_level);

GetConfStr("db-path", &db_path_);
Expand Down

0 comments on commit 4b5a58e

Please sign in to comment.