#include "stdafx.h" #include "BusinessLogger.h" #include "LogFacade.h" using namespace DIOS::Dev::Detail::MachineryECOM; BusinessLogger *BusinessLogger::m_instance = nullptr; BusinessLogger::BusinessLogger() :m_logger(nullptr) { } BusinessLogger::~BusinessLogger() { } BusinessLogger *BusinessLogger::Instance() { if (m_instance == nullptr) { m_instance = new BusinessLogger(); } return m_instance; } SimpleLog *&BusinessLogger::Get() { return m_logger; } void BusinessLogger::Initialize(const std::string &workpath) { SYSTEMTIME st; GetLocalTime(&st); char tmp[32] = { 0 }; //sprintf_s(tmp, "Logic_%04d%02d%02d", st.wYear, st.wMonth, st.wDay); sprintf_s(tmp, "A_Logic"); m_logger = LogFacade::CreateLogger(workpath, tmp); }