#pragma once #include "fmt/format.h" #include "DllDefines.h" #ifdef LEGACY_LOGGER #include "LegacyDebugLog.h" #include "LegacyDebugLogTiming.h" #include "LegacyGuiEventLog.h" extern UTILITYDLL CLegacyDebugLog mitechDebug; extern UTILITYDLL CLegacyDebugLogTiming mitechDebugLogTiming; extern UTILITYDLL CLegacyGuiEventLog mitechGuiEventLog; #else #include "spdlog/spdlog.h" #include "LogManager.h" using namespace mitech::utils::logging; extern UTILITYDLL CLogManager logManager; #endif // template void TraceLog(fmt::format_string _fmt, Args&&... args) { logManager.GetLogger(eLOGGER::DEBUG_LOG).Trace(_fmt, args...); } template void InfoLog(fmt::format_string _fmt, Args&&... args) { logManager.GetLogger(eLOGGER::DEBUG_LOG).Info(_fmt, args...); } template void DebugLog(fmt::format_string _fmt, Args&&... args) { logManager.GetLogger(eLOGGER::DEBUG_LOG).Log(_fmt, args...); } template void DebugLogTrace(bool bTraceData, fmt::format_string _fmt, Args&&... args) { if (bTraceData) { logManager.GetLogger(eLOGGER::DEBUG_LOG).Log(_fmt, args...); } } template void DebugLogError(bool bTraceData, fmt::format_string _fmt, Args&&... args) { if (bTraceData) { logManager.GetLogger(eLOGGER::DEBUG_LOG).Error(_fmt, args...); } } template void DebugLogTiming(fmt::format_string _fmt, Args&&... args) { logManager.GetLogger(eLOGGER::DEBUG_TIMING_LOG).Log(_fmt, args...); } template void DebugLogTimingTrace(bool bTraceData, fmt::format_string _fmt, Args&&... args) { if (bTraceData) { logManager.GetLogger(eLOGGER::DEBUG_TIMING_LOG).Log(_fmt, args...); } } template void GUIEventLog(fmt::format_string _fmt, Args&&... args) { logManager.GetLogger(eLOGGER::GUI_EVENT_LOG).Log(_fmt, args...); } std::shared_ptr UTILITYDLL GetLogger(const std::string& strName); void UTILITYDLL ShutdownLogging(); void UTILITYDLL StartDebugLog(); void UTILITYDLL StopDebugLog(); void UTILITYDLL StartDebugTimingLog(); void UTILITYDLL StopDebugTimingLog(); bool UTILITYDLL IsDebugLogStarted(); bool UTILITYDLL IsDebugLogTimingStarted(); // All GUI Activities Events Log void UTILITYDLL StartGUIEventLog(); void UTILITYDLL StopGUIEventLog();