Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
PragmaTwice authored Jun 11, 2024
1 parent a3e996a commit be9a8ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/cli/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,7 @@ static void InitGoogleLog(const Config *config) {
} else {
FLAGS_log_dir = config->log_dir + "/";
if (config->log_retention_days != -1) {
auto minutes =
std::chrono::duration_cast<std::chrono::minutes>(std::chrono::hours(24) * config->log_retention_days);
google::EnableLogCleaner(minutes);
google::EnableLogCleaner(std::chrono::hours(24) * config->log_retention_days);
}
}
}
Expand Down
4 changes: 1 addition & 3 deletions src/config/config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -553,9 +553,7 @@ void Config::initFieldCallback() {
}

if (log_retention_days != -1) {
auto minutes =
std::chrono::duration_cast<std::chrono::minutes>(std::chrono::hours(24) * log_retention_days);
google::EnableLogCleaner(minutes);
google::EnableLogCleaner(std::chrono::hours(24) * log_retention_days);
} else {
google::DisableLogCleaner();
}
Expand Down

0 comments on commit be9a8ed

Please sign in to comment.