mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 19:02:21 +01:00
update spdlog (it still dont work), fix 6.3(1)
This commit is contained in:
@@ -12,6 +12,8 @@
|
||||
#include <spdlog/sinks/stdout_color_sinks.h>
|
||||
#include <filesystem>
|
||||
|
||||
// #define ENABLE_SPD_LOG
|
||||
|
||||
static inline std::vector<spdlog::sink_ptr> sinks;
|
||||
|
||||
enum ELogLevel : uint8_t
|
||||
@@ -54,6 +56,8 @@ inline void InitLogger()
|
||||
}
|
||||
|
||||
SetConsoleTitleA("Project Reboot 3.0");
|
||||
|
||||
#ifdef ENABLE_SPD_LOG
|
||||
|
||||
std::string logName = "reboot.log"; // GenerateLogFileName();
|
||||
|
||||
@@ -89,8 +93,10 @@ inline void InitLogger()
|
||||
MakeLogger("LogRebooting");
|
||||
MakeLogger("LogObjectViewer");
|
||||
MakeLogger("LogLateGame");
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef ENABLE_SPD_LOG
|
||||
#define LOG_DEBUG(loggerName, ...) \
|
||||
if (spdlog::get(#loggerName)) \
|
||||
spdlog::get(#loggerName)->debug(std::format(__VA_ARGS__));
|
||||
@@ -105,4 +111,11 @@ inline void InitLogger()
|
||||
spdlog::get(#loggerName)->error(std::format(__VA_ARGS__));
|
||||
#define LOG_FATAL(loggerName, ...) \
|
||||
if (spdlog::get(#loggerName)) \
|
||||
spdlog::get(#loggerName)->critical(std::format(__VA_ARGS__));
|
||||
spdlog::get(#loggerName)->critical(std::format(__VA_ARGS__));
|
||||
#else
|
||||
#define LOG_DEBUG(loggerName, ...)
|
||||
#define LOG_INFO(loggerName, ...)
|
||||
#define LOG_WARN(loggerName, ...)
|
||||
#define LOG_ERROR(loggerName, ...)
|
||||
#define LOG_FATAL(loggerName, ...)
|
||||
#endif
|
||||
Reference in New Issue
Block a user