diff --git a/src/logging/Logger.cpp b/src/logging/Logger.cpp index 667185d..ed0c894 100644 --- a/src/logging/Logger.cpp +++ b/src/logging/Logger.cpp @@ -90,7 +90,6 @@ namespace Feather::Logging } m_channels[m_channelCount] = channel; int id = m_channelCount++; - printf("Registered channel %d '%s'\n", id, name); return id; } } diff --git a/src/logging/Logger.h b/src/logging/Logger.h index 2228894..08b363c 100644 --- a/src/logging/Logger.h +++ b/src/logging/Logger.h @@ -64,10 +64,20 @@ namespace Feather::Logging #define REGISTER_LOGGING_CHANNEL(Name) Feather::Logging::GlobalLogger.RegisterChannel(Name); +// Logs a message, specifying a channel and log level #define Log_Msg(_Channel, _Level, _Message, ...) Feather::Logging::GlobalLogger.LogDirect(Feather::Logging::_Channel, Feather::Logging::Level::_Level, _Message, ##__VA_ARGS__) +// Logs a general message for end-users #define Log_Info(Message, ...) Log_Msg(LOG_GENERAL, INFO, Message, ##__VA_ARGS__) + +// Logs a potential problem of note #define Log_Warn(Message, ...) Log_Msg(LOG_GENERAL, WARNING, Message, ##__VA_ARGS__) + +// Logs a serious problem #define Log_Error(Message, ...) Log_Msg(LOG_GENERAL, ERROR, Message, ##__VA_ARGS__) + +// Logs debug information for developers #define Log_Debug(Message, ...) Log_Msg(LOG_GENERAL, DEBUG, Message, ##__VA_ARGS__) + +// Logs fine grained debug information #define Log_Trace(Message, ...) Log_Msg(LOG_GENERAL, TRACE, Message, ##__VA_ARGS__)