Logging system cleanup
This commit is contained in:
parent
174af32355
commit
5abdafc614
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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__)
|
||||
|
|
Loading…
Reference in New Issue