16 const std::unordered_map<log_level, std::string, enum_hasher>
levels;
29 levels(config.find(
"color") != config.end() ? colored : uncolored)
37 virtual void log(
const std::string& message,
const log_level level) {
38 if(level < LOG_LEVEL_CUTOFF)
return;
40 output.reserve(message.length() + 64);
43 output.append(message);
44 output.push_back(
'\n');
50 virtual void log(
const std::string& message) {
Class providing the base for any logger.
Definition: logger.hpp:8
Class representing a logger capable of writing to standard out stream.
Definition: std_out_logger.hpp:7
const std::unordered_map< log_level, std::string, enum_hasher > levels
Map of logging levels.
Definition: std_out_logger.hpp:16
std_out_logger(const logging_config_t &config)
Standard out logger constructor.
Definition: std_out_logger.hpp:27
virtual void log(const std::string &message)
Definition: std_out_logger.hpp:50
virtual void log(const std::string &message, const log_level level)
Definition: std_out_logger.hpp:37