7#ifndef SRC_INCLUDE_LOGGED_HPP
8#define SRC_INCLUDE_LOGGED_HPP
35 MINIMUM_LOG_LEVEL_KEY,
36 FILE_NAME_PATTERN_KEY,
37 CONSOLE_LOG_LEVEL_KEY,
39 static const std::map<std::string, level> levelNames;
48 static void log(
const std::string& message,
const level lvl = level::NOTICE);
54 static void trace(
const std::string& message) {
log(message, level::TRACE); };
63 static void debug(
const std::string& message) {
log(message, level::DEBUG_LVL); };
70 static void info(
const std::string& message) {
log(message, level::INFO); };
77 static void notice(
const std::string& message) {
log(message, level::NOTICE); };
84 static void warning(
const std::string& message) {
log(message, level::WARNING); };
91 static void error(
const std::string& message) {
log(message, level::ERROR); };
99 static void critical(
const std::string& message) {
log(message, level::CRITICAL); };
106 static void alert(
const std::string& message) {
log(message, level::ALERT); };
113 static void emergency(
const std::string& message) {
log(message, level::EMERGENCY); };
A class to provide general logging facilities.
static void warning(const std::string &message)
Logs a message at level::WARNING, intended for abnormal conditions that do not affect the continuing ...
static void configure()
Static function that configures the logger.
static void log(const std::string &message, const level lvl=level::NOTICE)
Logs a message at the given log level, or default to level::NOTICE.
static void error(const std::string &message)
Logs a message at level::ERROR, intended for when the model reaches an unrecoverable state.
static void debug(const std::string &message)
Logs a message at level::DEBUG_LVL, intended for code debugging.
static void critical(const std::string &message)
Logs a message at level::CRITICAL, intended for critical situations, including detection of problems ...
static void alert(const std::string &message)
Logs a message at level::ALERT. Probably not needed for a geophysical model.
static void notice(const std::string &message)
Logs a message at level::NOTICE, intended for messages that would appear during normal execution.
static void trace(const std::string &message)
Logs a message at level::TRACE, intended for tracing code execution.
static void info(const std::string &message)
Logs a message at level::INFO, intended for informational messages that would not normally be shown.
static void emergency(const std::string &message)
Logs a message at level::EMERGENCY. Probably not needed for a geophysical model.