Logging system cleanup

This commit is contained in:
DankParrot 2020-07-28 21:37:22 -07:00
parent 174af32355
commit 5abdafc614
2 changed files with 10 additions and 1 deletions

View File

@ -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;
}
}

View File

@ -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__)