ADTF
|
Serves as component for basic logging functionality. More...
Classes | |
struct | LogEntry |
A log entry. More... | |
Typedefs | |
typedef experimental::UnaryDelegate< void, const LogEntry & > | Logger |
Logger interface definition. | |
Enumerations | |
enum | LogLevel { None = 0 , Error = 10 , Warning = 20 , Info = 30 , Dump = 40 , Debug = Dump , All = 0xFF } |
Usable log levels for LogEntry::log_level. More... | |
Functions | |
void | addEntry (const LogEntry &entry) |
Adds a new log entry to the current logger. More... | |
void | addEntry (std::uint8_t log_level, const std::string &message=a_util::strings::empty_string, const std::string &source=a_util::strings::empty_string) |
Adds a new log entry to the current logger. More... | |
void | setLogger (Logger log) |
Sets the currently used logger. More... | |
Logger | getLogger () |
Get the currently used logger. More... | |
std::string | defaultFormat (const LogEntry &entry) |
Get the default string representation of a log entry. More... | |
void | defaultLogger (const LogEntry &entry) |
Default logging method, that writes log messages to stdout. More... | |
Serves as component for basic logging functionality.
enum LogLevel |
Usable log levels for LogEntry::log_level.
Severity ordered from high to low.
Definition at line 30 of file workspace/conan/dev_essential/1.4.5/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/a_util/logging/log.h.
void a_util::logging::addEntry | ( | const LogEntry & | entry | ) |
Adds a new log entry to the current logger.
[in] | entry | The new log entry. |
void a_util::logging::addEntry | ( | std::uint8_t | log_level, |
const std::string & | message = a_util::strings::empty_string , |
||
const std::string & | source = a_util::strings::empty_string |
||
) |
Adds a new log entry to the current logger.
Automatically timestamps the entry.
[in] | log_level | The severity, LogLevel. |
[in] | message | The message text (optional) |
[in] | source | A string describing the source location (optional). |
std::string a_util::logging::defaultFormat | ( | const LogEntry & | entry | ) |
Get the default string representation of a log entry.
[in] | entry | The log entry. |
void a_util::logging::defaultLogger | ( | const LogEntry & | entry | ) |
Default logging method, that writes log messages to stdout.
[in] | entry | The log entry. |
Logger a_util::logging::getLogger | ( | ) |
Get the currently used logger.
void a_util::logging::setLogger | ( | Logger | log | ) |
Sets the currently used logger.
[in] | log | The new logger method. |