From 031d41eef1a744261479e549918764b871e1eca2 Mon Sep 17 00:00:00 2001 From: songhao Date: Fri, 21 Dec 2018 11:14:50 +0800 Subject: [PATCH] 1 --- cpp/tglog.cc | 4 +++- cpp/tglog.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cpp/tglog.cc b/cpp/tglog.cc index e361537..4d412d7 100644 --- a/cpp/tglog.cc +++ b/cpp/tglog.cc @@ -64,8 +64,10 @@ namespace f8 } }; - void TGLog::Init() + void TGLog::Init(const std::string& project_name, bool is_poly_log) { + project_name_ = project_name; + is_poly_log_ = is_poly_log; impl_ = new TGLogImpl(); impl_->filename_fmt = TGLOG_FILENAME; a8::ReplaceString(impl_->filename_fmt, "$pid", a8::XValue(getpid())); diff --git a/cpp/tglog.h b/cpp/tglog.h index 663560a..4aa1c40 100644 --- a/cpp/tglog.h +++ b/cpp/tglog.h @@ -10,7 +10,7 @@ namespace f8 friend class a8::Singleton; public: - void Init(); + void Init(const std::string& project_name, bool is_poly_log); void UnInit(); void SetProjectInfo(const std::string& project_name, bool is_poly_log);