#ifndef __UT_LOG_INITOR_HPP__ #define __UT_LOG_INITOR_HPP__ #include #include #include namespace unitree { namespace common { class LogInitor { public: static LogInitor* Instance() { static LogInitor inst; return &inst; } void Init(const std::string& configFileName); Logger* GetLogger(const std::string& tag); void Final(); private: LogInitor(); void ParseConf(Any json); void InitLogger(); private: bool mInited; std::set mStoreNames; std::vector mPolicis; std::vector mStorePolicis; std::map mLoggerMap; Mutex mLock; }; void LogInit(const std::string& configFileName = ""); void LogFinal(); Logger* GetLogger(const std::string& tag); } } #endif//__UT_LOG_INITOR_HPP__