File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 11#include < gflags/gflags.h>
2+ #include < glog/logging.h>
23
34#include < chrono> // For std::chrono
45#include < memory> // For std::unique_ptr
@@ -357,10 +358,25 @@ std::unique_ptr<mooncake::HttpMetadataServer> StartHttpMetadataServer(
357358 }
358359}
359360
361+ class GlogRAII {
362+ public:
363+ GlogRAII (const char * argv0) {
364+ google::InitGoogleLogging (argv0);
365+ }
366+
367+ ~GlogRAII () {
368+ LOG (INFO) << " Shutting down glog gracefully" ;
369+ google::ShutdownGoogleLogging ();
370+ }
371+ };
372+
360373int main (int argc, char * argv[]) {
361374 easylog::set_min_severity (easylog::Severity::WARN);
362375 // Initialize gflags
363376 gflags::ParseCommandLineFlags (&argc, &argv, true );
377+
378+ GlogRAII glogRAII (argv[0 ]);
379+
364380 // Initialize the master configuration
365381 mooncake::MasterConfig master_config;
366382 std::string conf_path = FLAGS_config_path;
You can’t perform that action at this time.
0 commit comments