101 void error(
const std::string& message);
108 template<
typename... Args>
109 void error(
const std::string& message, Args... args)
111 auto formattedMsg = vFormat(message, args...);
119 void warning(
const std::string& message);
126 template<
typename... Args>
127 void warning(
const std::string& message, Args... args)
129 auto formattedMsg = vFormat(message, args...);
137 void info(
const std::string& message);
143 void debug(
const std::string& message);
150 template<
typename... Args>
151 void debug(
const std::string& message, Args... args)
153 auto formattedMsg = vFormat(message, args...);
174 void log(
const std::string& message);
std::ofstream file
The log file stream.
Definition logging.hpp:161
Logger(const std::string &name, const std::string &filename, const Level level=Level::INFO)
Constructs a Logger object.
Definition logging.cpp:36
Level level
The default logging level.
Definition logging.hpp:164
void log(const std::string &message)
Logs a message.
Definition logging.cpp:45
void warning(const std::string &message, Args... args)
Logs a warning message with additional arguments.
Definition logging.hpp:127
~Logger()
Destroys the Logger object.
Definition logging.cpp:43
std::string name
The name of the logger. This will be prepended to the log messages.
Definition logging.hpp:167
void error(const std::string &message, Args... args)
Logs an error message with additional arguments.
Definition logging.hpp:109
void debug(const std::string &message, Args... args)
Logs a debug message with additional arguments.
Definition logging.hpp:151
void warning(const std::string &message)
Logs a warning message.
Definition logging.cpp:60
void error(const std::string &message)
Logs an error message.
Definition logging.cpp:54
void debug(const std::string &message)
Logs a debug message.
Definition logging.cpp:72
void info(const std::string &message)
Logs an info message.
Definition logging.cpp:66
The logging namespace contains classes and functions for logging. The logging namespace contains the ...
Definition logging.cpp:32
Level
Enumeration of logging levels.
Definition logging.hpp:59
@ ERR
Logs ONLY error messages.
Definition logging.hpp:61
@ INFO
Logs error, warning, and info messages. Recommended for release.
Definition logging.hpp:65
@ DBG
Logs error, warning, info, and debug messages. Basically, logs everything.
Definition logging.hpp:67
@ WARNING
Logs error and warning messages.
Definition logging.hpp:63