From 81e71dd452acb1b97e873adc3db562f93c858f55 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Fri, 7 Aug 2020 06:55:17 +0100 Subject: [PATCH] Add logging comments --- src/logging/Logger.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/logging/Logger.h b/src/logging/Logger.h index 1a75eb6..2d23191 100644 --- a/src/logging/Logger.h +++ b/src/logging/Logger.h @@ -139,24 +139,30 @@ namespace Feather::Log std::vector m_channels; }; + // Logs a message, specifying a channel and log level template 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 void Info(const S& fmt, Args... args) { Msg(Channels::General, Level::Info, fmt, args...); } + // Logs a potential problem of note template void Warn(const S& fmt, Args... args) { Msg(Channels::General, Level::Warning, fmt, args...); } + // Logs a serious problem template void Error(const S& fmt, Args... args) { Msg(Channels::General, Level::Error, fmt, args...); } + // Logs debug information for developers template void Debug(const S& fmt, Args... args) { Msg(Channels::General, Level::Debug, fmt, args...); } + // Logs fine grained debug information template void Trace(const S& fmt, Args... args) { Msg(Channels::General, Level::Trace, fmt, args...); } } \ No newline at end of file