Add logging comments
This commit is contained in:
parent
1a32bae941
commit
81e71dd452
|
@ -139,24 +139,30 @@ namespace Feather::Log
|
|||
std::vector<Channel> m_channels;
|
||||
};
|
||||
|
||||
// Logs a message, specifying a channel and log level
|
||||
template <class S, typename... Args>
|
||||
void Msg(ChannelID channel, Level level, const S& fmt, Args... args)
|
||||
{
|
||||
Logger::Instance().Log(channel, level, fmt, args...);
|
||||
}
|
||||
|
||||
// Logs a general message for end-users
|
||||
template <class S, typename... Args>
|
||||
void Info(const S& fmt, Args... args) { Msg(Channels::General, Level::Info, fmt, args...); }
|
||||
|
||||
// Logs a potential problem of note
|
||||
template <class S, typename... Args>
|
||||
void Warn(const S& fmt, Args... args) { Msg(Channels::General, Level::Warning, fmt, args...); }
|
||||
|
||||
// Logs a serious problem
|
||||
template <class S, typename... Args>
|
||||
void Error(const S& fmt, Args... args) { Msg(Channels::General, Level::Error, fmt, args...); }
|
||||
|
||||
// Logs debug information for developers
|
||||
template <class S, typename... Args>
|
||||
void Debug(const S& fmt, Args... args) { Msg(Channels::General, Level::Debug, fmt, args...); }
|
||||
|
||||
// Logs fine grained debug information
|
||||
template <class S, typename... Args>
|
||||
void Trace(const S& fmt, Args... args) { Msg(Channels::General, Level::Trace, fmt, args...); }
|
||||
}
|
Loading…
Reference in New Issue