f8/cpp/tglog.h
songhao 031d41eef1 1
2018-12-21 11:14:50 +08:00

29 lines
713 B
C++

#pragma once
namespace f8
{
struct TGLogImpl;
class TGLog : public a8::Singleton<TGLog>
{
private:
TGLog() {};
friend class a8::Singleton<TGLog>;
public:
void Init(const std::string& project_name, bool is_poly_log);
void UnInit();
void SetProjectInfo(const std::string& project_name, bool is_poly_log);
void AddTrackLog(int game_id, const std::string& accountid, unsigned long ip_saddr,
int logclass1, int logclass2, a8::XObject* prop);
private:
void SaveToFileThreadProc();
private:
std::string project_name_;
bool is_poly_log_ = false;
TGLogImpl* impl_ = nullptr;
};
}