6#define SPDLOG_WCHAR_SUPPORT
8#include <spdlog/async.h>
9#include <spdlog/sinks/basic_file_sink.h>
10#include <spdlog/sinks/stdout_color_sinks.h>
11#include <spdlog/spdlog.h>
14#define _LOGGER Sleak::Logger::GetCoreLogger()
16#define _LOGGER Sleak::Logger::GetLogger()
19#define SLEAK_LOG(...) _LOGGER->trace(__VA_ARGS__);
20#define SLEAK_INFO(...) _LOGGER->info(__VA_ARGS__);
21#define SLEAK_WARN(...) _LOGGER->warn(__VA_ARGS__);
22#define SLEAK_ERROR(...) _LOGGER->error(__VA_ARGS__);
23#define SLEAK_FATAL(...) _LOGGER->critical(__VA_ARGS__);
25#define SLEAK_RETURN_ERR(...) \
27 SLEAK_ERROR(__VA_ARGS__) \
71 static void Init(
const std::string& ProjectName);
76 static std::shared_ptr<spdlog::logger>&
GetLogger();
79 static std::shared_ptr<spdlog::logger> CoreLogger;
80 static std::shared_ptr<spdlog::logger> GameLogger;
static std::shared_ptr< spdlog::logger > & GetLogger()
Logger used by game code.
static std::shared_ptr< spdlog::logger > & GetCoreLogger()
Logger used by engine code (SLEAK_ENGINE builds).
static void Init(const std::string &ProjectName)
Creates the console + file sinks and registers both loggers. Call once at startup.
Root namespace for everything the engine exposes.