ADTF
builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/src/libraries/a_utils/include/a_utils/std/log.h File Reference

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 _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...
 
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...
 

Detailed Description

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.

Macro Definition Documentation

◆ LOG_ADD_ENTRY

#define LOG_ADD_ENTRY (   __level,
  ... 
)
Value:
A_UTILS_NS::cString::Format(__VA_ARGS__).GetPtr(),\
A_UTILS_NS::cString::Format("%s:%d(%s)", __FILE__, __LINE__, __FUNC__).GetPtr())
static _myType Format(const value_type *strFormat,...)
Write formatted data to a string.
Definition: string.h:2405
tVoid add_entry(const tLogEntry &sEntry)
Adds a new log entry to the current logger.

internal

Definition at line 115 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/src/libraries/a_utils/include/a_utils/std/log.h.