#pragma once #include #include "logger_settings.h" class Logger { private: inline const static std::wstring logFailedShown = L"logFailedShown"; static std::shared_ptr logger; static bool wasLogFailedShown(); public: Logger() = delete; static void init(std::string loggerName, std::wstring logFilePath, std::wstring_view logSettingsPath); // log message should not be localized template static void trace(const FormatString& fmt, const Args&... args) { logger->trace(fmt, args...); } // log message should not be localized template static void debug(const FormatString& fmt, const Args&... args) { logger->debug(fmt, args...); } // log message should not be localized template static void info(const FormatString& fmt, const Args&... args) { logger->info(fmt, args...); } // log message should not be localized template static void warn(const FormatString& fmt, const Args&... args) { logger->warn(fmt, args...); } // log message should not be localized template static void error(const FormatString& fmt, const Args&... args) { logger->error(fmt, args...); } // log message should not be localized template static void critical(const FormatString& fmt, const Args&... args) { logger->critical(fmt, args...); } static void flush() { logger->flush(); } };