ADTF
|
Copyright © Audi Electronics Venture GmbH. More...
Go to the source code of this file.
Classes | |
struct | tLogEntry |
A log entry. More... | |
Namespaces | |
A_UTILS_NS | |
ADTF A_UTIL Namespace - Within adtf this is used as adtf::util or adtf_util. | |
A_UTILS_NS::log | |
namespace for default logging functionality within A_UTILS_NS | |
Macros | |
#define | LOG_RESULT(code) |
Log result to console. More... | |
#define | RETURN_AND_LOG_ERROR(code) |
Log error code to console and return from the current function. More... | |
#define | RETURN_AND_LOG_ERROR_STR(code, ...) |
Log custom error description to console and return from the current function. More... | |
#define | RETURN_IF_FAILED_AND_LOG_ERROR_STR(code, ...) |
Log custom error description to console and return from the current function. More... | |
#define | _A_UTILS_STRINGIFY(__number) #__number |
internal | |
#define | _A_UTILS_TO_STRING(__number) _A_UTILS_STRINGIFY(__number) |
internal | |
#define | LOG_ADD_ENTRY(__level, ...) |
internal More... | |
#define | LOG_DUMP(...) |
Logs a dump message. | |
#define | LOG_DETAIL(...) LOG_ADD_ENTRY(A_UTILS_NS::log::tLogLevel::Detail, __VA_ARGS__) |
Logs additional information. | |
#define | LOG_INFO(...) LOG_ADD_ENTRY(A_UTILS_NS::log::tLogLevel::Info, __VA_ARGS__) |
Logs an info message. | |
#define | LOG_WARNING(...) LOG_ADD_ENTRY(A_UTILS_NS::log::tLogLevel::Warning, __VA_ARGS__) |
Logs a warning message. | |
#define | LOG_ERROR(...) LOG_ADD_ENTRY(A_UTILS_NS::log::tLogLevel::Error, __VA_ARGS__) |
Logs an error message. | |
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... | |
tTimeStamp | log_get_current_date_time () |
Internal helper to hide cDateTime::GetCurrentDateTime. | |
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... | |
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... | |
Copyright © Audi Electronics Venture GmbH.
All rights reserved
Definition in file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/src/libraries/a_utils/include/a_utils/std/log.h.
#define LOG_ADD_ENTRY | ( | __level, | |
... | |||
) |
internal
Definition at line 171 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/src/libraries/a_utils/include/a_utils/std/log.h.
#define LOG_RESULT | ( | code | ) |
Log result to console.
Definition at line 15 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/src/libraries/a_utils/include/a_utils/std/log.h.
#define RETURN_AND_LOG_ERROR | ( | code | ) |
Log error code to console and return from the current function.
This requires the calling function's return type to be tResult.
Definition at line 32 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/src/libraries/a_utils/include/a_utils/std/log.h.
#define RETURN_AND_LOG_ERROR_STR | ( | code, | |
... | |||
) |
Log custom error description to console and return from the current function.
This requires the calling function's return type to be tResult.
Definition at line 43 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/src/libraries/a_utils/include/a_utils/std/log.h.
#define RETURN_IF_FAILED_AND_LOG_ERROR_STR | ( | code, | |
... | |||
) |
Log custom error description to console and return from the current function.
This requires the calling function's return type to be tResult.
Definition at line 53 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/src/libraries/a_utils/include/a_utils/std/log.h.