You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kvrocks.apache.org by al...@apache.org on 2024/11/11 11:45:51 UTC

(kvrocks) branch aleksraiden-glog-new created (now 387a72ab)

This is an automated email from the ASF dual-hosted git repository.

aleksraiden pushed a change to branch aleksraiden-glog-new
in repository https://gitbox.apache.org/repos/asf/kvrocks.git


      at 387a72ab Add fix

This branch includes the following new commits:

     new 764521fb bump glog v0.7.1
     new 387a72ab Add fix

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(kvrocks) 01/02: bump glog v0.7.1

Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aleksraiden pushed a commit to branch aleksraiden-glog-new
in repository https://gitbox.apache.org/repos/asf/kvrocks.git

commit 764521fbe5a09b26e05728b9140ba40da0af1147
Author: Aleks Lozovyuk <al...@gmail.com>
AuthorDate: Mon Nov 11 13:40:46 2024 +0200

    bump glog v0.7.1
---
 cmake/glog.cmake | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cmake/glog.cmake b/cmake/glog.cmake
index 5e9c1268..50b892fe 100644
--- a/cmake/glog.cmake
+++ b/cmake/glog.cmake
@@ -20,8 +20,8 @@ include_guard()
 include(cmake/utils.cmake)
 
 FetchContent_DeclareGitHubWithMirror(glog
-  google/glog v0.6.0
-  MD5=1b246d4d0e8a011d33e0813b256198ef
+  google/glog v0.7.1
+  MD5=fa30180d4284c454bdd324ad3baf7f5f
 )
 
 FetchContent_MakeAvailableWithArgs(glog


(kvrocks) 02/02: Add fix

Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aleksraiden pushed a commit to branch aleksraiden-glog-new
in repository https://gitbox.apache.org/repos/asf/kvrocks.git

commit 387a72ab0ff469e29c85242033289083dcd6d50b
Author: Aleks Lozovyuk <al...@gmail.com>
AuthorDate: Mon Nov 11 13:45:40 2024 +0200

    Add fix
---
 src/cli/main.cc      | 5 +++--
 src/config/config.cc | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/cli/main.cc b/src/cli/main.cc
index 3eaf4b13..efe1c542 100644
--- a/src/cli/main.cc
+++ b/src/cli/main.cc
@@ -31,6 +31,7 @@
 #include <ostream>
 
 #include "daemon_util.h"
+#include "glog/log_severity.h"
 #include "io_util.h"
 #include "pid_util.h"
 #include "scope_exit.h"
@@ -100,7 +101,7 @@ 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;
@@ -108,7 +109,7 @@ static void InitGoogleLog(const Config *config) {
   } else {
     FLAGS_log_dir = config->log_dir + "/";
     if (config->log_retention_days != -1) {
-      google::EnableLogCleaner(config->log_retention_days);
+      google::EnableLogCleaner(std::chrono::hours(24) * config->log_retention_days);
     }
   }
 }
diff --git a/src/config/config.cc b/src/config/config.cc
index f14dc78c..e15144ed 100644
--- a/src/config/config.cc
+++ b/src/config/config.cc
@@ -597,7 +597,7 @@ void Config::initFieldCallback() {
              }
 
              if (log_retention_days != -1) {
-               google::EnableLogCleaner(log_retention_days);
+               google::EnableLogCleaner(std::chrono::hours(24) * log_retention_days);
              } else {
                google::DisableLogCleaner();
              }