37 explicit Logger(
const std::string& filepath);
63 virtual void log(
LogLevel level,
const std::string& tag,
const std::string& message);
70 virtual void d(
const std::string& message);
78 virtual void d(
const std::string& tag,
const std::string& message);
85 virtual void i(
const std::string& message);
93 virtual void i(
const std::string& tag,
const std::string& message);
100 virtual void w(
const std::string& message);
108 virtual void w(
const std::string& tag,
const std::string& message);
115 virtual void e(
const std::string& message);
123 virtual void e(
const std::string& tag,
const std::string& message);
134 std::ofstream m_file_stream;
The base logger class.
Definition log.h:30
virtual void e(const std::string &tag, const std::string &message)
Logs a message at the error log level.
virtual void log(LogLevel level, const std::string &tag, const std::string &message)
Logs a message at a log level.
virtual void log(LogLevel level, const std::string &message)
Logs a message at a log level.
virtual void w(const std::string &tag, const std::string &message)
Logs a message at the warning log level.
void set_log_level(LogLevel level)
Sets the current log level.
virtual void d(const std::string &tag, const std::string &message)
Logs a message at the debug log level.
Logger(const std::string &filepath)
Constructs a logger that writes to a file.
Logger()=default
Constructs an empty logger.
virtual void i(const std::string &message)
Logs a message at the info log level.
virtual void d(const std::string &message)
Logs a message at the debug log level.
virtual void e(const std::string &message)
Logs a message at the error log level.
virtual void i(const std::string &tag, const std::string &message)
Logs a message at the info log level.
virtual void w(const std::string &message)
Logs a message at the warning log level.
LogLevel
The log level that is displayed with the message in the log.
Definition log.h:19