Skip to content

Commit

Permalink
[BugFix] Fixing logging initialized before loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
mapleFU committed Nov 1, 2022
1 parent 684bcc6 commit 166db4d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/config/config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,9 @@ void Config::initFieldCallback() {
previous_backup = std::move(backup_dir);
backup_dir = v;
}
if (!previous_backup.empty()) {
LOG(INFO) << "change backup dir from " << backup_dir << " to " << v;
if (!previous_backup.empty() && srv != nullptr && !srv->IsLoading()) {
// LOG(INFO) should be called after log is initialized and server is loaded.
LOG(INFO) << "change backup dir from " << previous_backup << " to " << v;
}
return Status::OK();
}},
Expand Down

0 comments on commit 166db4d

Please sign in to comment.