29 #include <unordered_map>
38 #define __cdecl __attribute__((__cdecl__))
41 #define AUTHENTICATION_CHANNEL "Authentication"
65 typedef void(__cdecl *
LogHandler)(LogLevel level,
const char* channel,
const char* message);
83 EXTERNAL
static std::shared_ptr<Log>
Instance();
90 EXTERNAL
static void SetInstance(std::shared_ptr<Log> logPtr);
120 EXTERNAL
void Write(
const std::string& message,
const std::string& channel, LogLevel level);
128 EXTERNAL
static void Debug(
const std::string& message,
const std::string& channel =
"Root");
136 EXTERNAL
static void Info(
const std::string& message,
const std::string& channel =
"Root");
144 EXTERNAL
static void Warning(
const std::string& message,
const std::string& channel =
"Root");
152 EXTERNAL
static void Error(
const std::string& message,
const std::string& channel =
"Root");
160 EXTERNAL
static void Fatal(
const std::string& message,
const std::string& channel =
"Root");
178 static std::shared_ptr<Log> m_instancePtr;
187 std::unordered_map<std::string, std::vector<Logger>> m_loggers;
198 const std::string& message,
199 const std::string& channel,
201 const std::string& handler);
EXTERNAL void Write(const std::string &message, const std::string &channel, LogLevel level)
static EXTERNAL std::shared_ptr< Log > Instance()
static EXTERNAL void Info(const std::string &message, const std::string &channel="Root")
static EXTERNAL void Error(const std::string &message, const std::string &channel="Root")
static EXTERNAL std::string GetTimeString()
static EXTERNAL std::string GetLevelString(LogLevel logLevel)
EXTERNAL void RegisterCallback(const std::string &channel, LogHandler handler, uint8_t levels, bool allowBubbling)
static EXTERNAL void Debug(const std::string &message, const std::string &channel="Root")
EXTERNAL void UnregisterCallback(const std::string &channel, LogHandler handler)
static EXTERNAL void Fatal(const std::string &message, const std::string &channel="Root")
static EXTERNAL void Warning(const std::string &message, const std::string &channel="Root")
static EXTERNAL void SetInstance(std::shared_ptr< Log > logPtr)
Definition: sfDictionaryProperty.h:24
void(__cdecl * LogHandler)(LogLevel level, const char *channel, const char *message)
Definition: Log.h:65