This is an automated email from the ASF dual-hosted git repository.
aleksraiden pushed a commit to branch aleksraiden-gloginit-reorder
in repository https://gitbox.apache.org/repos/asf/kvrocks.git
The following commit(s) were added to refs/heads/aleksraiden-gloginit-reorder
by this push:
new e0c8814c Update main.cc
e0c8814c is described below
commit e0c8814c71daf1f200e06fd4e6b51c25845fda46
Author: Aleks Lozovyuk <[email protected]>
AuthorDate: Thu Nov 14 12:23:49 2024 +0300
Update main.cc
---
src/cli/main.cc | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/cli/main.cc b/src/cli/main.cc
index 3eaf4b13..b460671d 100644
--- a/src/cli/main.cc
+++ b/src/cli/main.cc
@@ -116,9 +116,6 @@ static void InitGoogleLog(const Config *config) {
int main(int argc, char *argv[]) {
srand(static_cast<unsigned>(util::GetTimeStamp()));
- google::InitGoogleLogging("kvrocks");
- auto glog_exit = MakeScopeExit(google::ShutdownGoogleLogging);
-
evthread_use_pthreads();
auto event_exit = MakeScopeExit(libevent_global_shutdown);
@@ -141,6 +138,10 @@ int main(int argc, char *argv[]) {
crc64_init();
InitGoogleLog(&config);
+
+ google::InitGoogleLogging("kvrocks");
+ auto glog_exit = MakeScopeExit(google::ShutdownGoogleLogging);
+
LOG(INFO) << "kvrocks " << PrintVersion;
// Tricky: We don't expect that different instances running on the same port,
// but the server use REUSE_PORT to support the multi listeners. So we
connect