You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
972 B
C++

#pragma once
#include <array>
#include <map>
#include "LogSettings.h"
#include "Logger.h"
namespace mitech::utils::logging
{
enum class eLOGGER
{
DEBUG_LOG,
DEBUG_TIMING_LOG,
GUI_EVENT_LOG,
MAX_LOGGER
};
class CLogManager
{
public:
CLogManager();
virtual ~CLogManager();
void Initialize();
void Shutdown() const;
CLogger& GetLogger(eLOGGER eLog) { return *m_mapLogger[eLog]; }
private:
const std::map<eLOGGER, std::string> m_mapLoggerSettingFile{
{ eLOGGER::DEBUG_LOG, R"(d:\machine\ini\debugLogSetting.json)" },
{ eLOGGER::DEBUG_TIMING_LOG, R"(d:\machine\ini\debugLogTimingSetting.json)" },
{ eLOGGER::GUI_EVENT_LOG, R"(d:\machine\ini\guiEventLogSetting.json)" }
};
std::map<eLOGGER, stLogOption> m_mapLoggerOption;
std::map<eLOGGER, std::unique_ptr<CLogger>> m_mapLogger;
};
}