You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "PragmaTwice (via GitHub)" <gi...@apache.org> on 2024/06/11 14:25:34 UTC
Re: [PR] chore: Bump glog to 0.7.1 [kvrocks]
PragmaTwice commented on code in PR #2106:
URL: https://github.com/apache/kvrocks/pull/2106#discussion_r1634988107
##########
src/cli/main.cc:
##########
@@ -103,15 +104,17 @@ static void InitGoogleLog(const Config *config) {
if (util::EqualICase(config->log_dir, "stdout")) {
for (int level = google::INFO; level <= google::FATAL; level++) {
- google::SetLogDestination(level, "");
+ google::SetLogDestination(static_cast<google::LogSeverity>(level), "");
}
FLAGS_stderrthreshold = google::ERROR;
FLAGS_logtostdout = true;
std::setbuf(stdout, nullptr);
} else {
FLAGS_log_dir = config->log_dir + "/";
if (config->log_retention_days != -1) {
- google::EnableLogCleaner(config->log_retention_days);
+ auto minutes =
+ std::chrono::duration_cast<std::chrono::minutes>(std::chrono::hours(24) * config->log_retention_days);
+ google::EnableLogCleaner(minutes);
Review Comment:
```suggestion
google::EnableLogCleaner(std::chrono::hours(24) * config->log_retention_days);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org