ADTF
|
namespace for default logging functionality within A_UTILS_NS More...
Classes | |
struct | tLogEntry |
A log entry. More... | |
Typedefs | |
typedef std::function< tVoid(const tLogEntry &sEntry)> | logger |
Logger interface definition. | |
Enumerations | |
enum | tLogLevel { None = 0 , Error = 10 , Warning = 20 , Info = 30 , Detail = 35 , Dump = 40 , Debug = Dump , All = 0xFF } |
Log levels. | |
Functions | |
tVoid | add_entry (const tLogEntry &sEntry) |
Adds a new log entry to the current logger. More... | |
tVoid | add_entry (tUInt8 nLogLevel, const tChar *strMessage=nullptr, const tChar *strSource=nullptr) |
Adds a new log entry to the current logger. More... | |
tVoid | set_logger (logger oLogger) |
Sets the currently used logger. More... | |
logger | get_logger () |
Returns the currently used logger. More... | |
cString | default_format (const tLogEntry &sEntry) |
Returns the default string representation of a log entry. More... | |
tVoid | default_logger (const tLogEntry &sEntry) |
Default logging method, that writes log messages to stdout. More... | |
tVoid | set_filtered_logging (tUInt8 nMaxLogLevel, logger oLogger=default_logger) |
Convenience method to filter log messages. More... | |
namespace for default logging functionality within A_UTILS_NS
Adds a new log entry to the current logger.
[in] | sEntry | The new log entry. |
Referenced by add_entry().
|
inline |
Adds a new log entry to the current logger.
Automatically timestamps the entry.
[in] | nLogLevel | The severity, tLogLevel. |
[in] | strMessage | The message text (optional) |
[in] | strSource | A string describing the source location (optional). |
Definition at line 57 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/src/libraries/a_utils/include/a_utils/std/log.h.
References add_entry(), cDateTime::GetCurrentDateTime(), and cDateTime::ToTimeStamp().
Returns the default string representation of a log entry.
[in] | sEntry | The log entry. |
Default logging method, that writes log messages to stdout.
[in] | sEntry | The log entry. |
logger A_UTILS_NS::log::get_logger | ( | ) |
Returns the currently used logger.
|
inline |
Convenience method to filter log messages.
[in] | nMaxLogLevel | The maximum log level. |
[in] | oLogger | The logger that will be used. |
Definition at line 99 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/src/libraries/a_utils/include/a_utils/std/log.h.
References tLogEntry::nLogLevel, and set_logger().
Sets the currently used logger.
[in] | oLogger | The new logger method. |
Referenced by set_filtered_logging().