This commit is contained in:
songhao 2018-12-21 11:14:50 +08:00
parent 6614d9299a
commit 031d41eef1
2 changed files with 4 additions and 2 deletions

View File

@ -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_ = new TGLogImpl();
impl_->filename_fmt = TGLOG_FILENAME; impl_->filename_fmt = TGLOG_FILENAME;
a8::ReplaceString(impl_->filename_fmt, "$pid", a8::XValue(getpid())); a8::ReplaceString(impl_->filename_fmt, "$pid", a8::XValue(getpid()));

View File

@ -10,7 +10,7 @@ namespace f8
friend class a8::Singleton<TGLog>; friend class a8::Singleton<TGLog>;
public: public:
void Init(); void Init(const std::string& project_name, bool is_poly_log);
void UnInit(); void UnInit();
void SetProjectInfo(const std::string& project_name, bool is_poly_log); void SetProjectInfo(const std::string& project_name, bool is_poly_log);