|
iceoryx2
C++ Language Bindings
|
Namespaces | |
| namespace | internal |
Classes | |
| class | ConsoleLogger |
| A minimal logger implementation which outputs the log messages to the console. More... | |
| class | LogBin |
| Helper struct to log in binary format. More... | |
| struct | LogBuffer |
| Provides access to the log buffer if direct access is required. More... | |
| class | LogHex |
| Helper struct to log in hexadecimal format. More... | |
| class | LogOct |
| Helper struct to log in octal format. More... | |
| class | LogRaw |
| Helper struct to log in raw bytes. More... | |
| class | LogStream |
| This class provides the public interface to the logger and is used with the 'IOX2_LOG' macro. In order to add support for custom data types 'operator<<' needs to be implement for the custom type. More... | |
Typedefs | |
| using | Logger = internal::Logger< ConsoleLogger > |
| using | TestingLoggerBase = internal::Logger< ConsoleLogger > |
Enumerations | |
| enum class | LogLevel : uint8_t { Off = 0 , Fatal , Error , Warn , Info , Debug , Trace } |
| This enum defines the log levels used for logging. More... | |
Functions | |
| constexpr const char * | logLevelDisplayColor (const LogLevel value) noexcept |
| converts LogLevel into a string literal color code | |
| constexpr const char * | logLevelDisplayText (const LogLevel value) noexcept |
| converts LogLevel into a string literal display text | |
| constexpr const char * | asStringLiteral (const LogLevel value) noexcept |
| converts LogLevel into a string literal | |
| template<uint32_t N> | |
| bool | equalStrings (const char *lhs, const char(&rhs)[N]) noexcept |
| Compares C-style strings with a char array, i.g. string literal for equality. | |
| LogLevel | logLevelFromEnvOr (const LogLevel logLevel) noexcept |
| Tries to get the log level from the 'IOX2_LOG_LEVEL' env variable or uses the specified one if the env variable is not set. | |
| template<typename T , typename = std::enable_if_t<std::is_arithmetic<T>::value && !std::is_same<T, bool>::value>> | |
| constexpr LogHex< T > | hex (const T value) noexcept |
| Log a number in hexadecimal format. | |
| constexpr LogHex< const void *const > | hex (const void *const ptr) noexcept |
| Log a pointer in hexadecimal format. | |
| template<typename T , typename = std::enable_if_t<std::is_integral<T>::value && !std::is_same<T, bool>::value>> | |
| constexpr LogOct< T > | oct (const T value) noexcept |
| Log a number in octal format. | |
| template<typename T , typename = std::enable_if_t<std::is_integral<T>::value && !std::is_same<T, bool>::value>> | |
| constexpr LogBin< T > | bin (const T value) noexcept |
| Log a number in binary format. | |
| template<typename T > | |
| constexpr std::enable_if<!std::is_pointer< T >::value, LogRaw >::type | raw (const T &object) noexcept |
| Log an object in raw bytes. | |
| constexpr LogRaw | raw (const void *const data, const uint64_t size) noexcept |
| Log data in raw bytes. | |
Variables | |
| template<typename T > | |
| static constexpr const char * | LOG_FORMAT_DEC { internal::logFormatDec<T>() } |
| printf-like format string for decimal formatting of numbers | |
| template<typename T > | |
| static constexpr const char * | LOG_FORMAT_HEX { internal::logFormatHex<T>() } |
| printf-like format string for hexadecimal formatting of numbers | |
| template<typename T > | |
| static constexpr const char * | LOG_FORMAT_OCT { internal::logFormatOct<T>() } |
| printf-like format string for octal formatting of numbers | |
| static constexpr bool | IGNORE_ACTIVE_LOG_LEVEL { false } |
| If set to true, the IOX2_LOG macro will ignore the the configured log level and forward all messages to the logger. This is useful in cases the default ConsoleLogger is replaced by a custom logger which does the filtering by itself. | |
| static constexpr LogLevel | MINIMAL_LOG_LEVEL { LogLevel::Trace } |
| The minimal log level which will be compiled into the application. All log levels below this will be optimized out at compile time. | |
Definition at line 34 of file logger.hpp.
Definition at line 35 of file logger.hpp.
|
strong |
This enum defines the log levels used for logging.
| Enumerator | |
|---|---|
| Off | |
| Fatal | |
| Error | |
| Warn | |
| Info | |
| Debug | |
| Trace | |
Definition at line 30 of file logger.hpp.
converts LogLevel into a string literal
| [in] | value | the LogLevel to convert |
|
noexcept |
Compares C-style strings with a char array, i.g. string literal for equality.
in] N size of the char array
| [in] | lhs | C-style string to compare |
| [in] | rhs | char array to compare |
|
constexprnoexcept |
converts LogLevel into a string literal color code
| [in] | value | the LogLevel to convert |
|
constexprnoexcept |
converts LogLevel into a string literal display text
| [in] | value | the LogLevel to convert |
Tries to get the log level from the 'IOX2_LOG_LEVEL' env variable or uses the specified one if the env variable is not set.
| [in] | logLevel | is the log level to be used when the env variable is not set |
If set to true, the IOX2_LOG macro will ignore the the configured log level and forward all messages to the logger. This is useful in cases the default ConsoleLogger is replaced by a custom logger which does the filtering by itself.
Definition at line 42 of file logger.hpp.
Referenced by iox2::legacy::log::internal::is_log_level_active().
|
staticconstexpr |
printf-like format string for decimal formatting of numbers
Definition at line 114 of file logformat.hpp.
|
staticconstexpr |
printf-like format string for hexadecimal formatting of numbers
Definition at line 118 of file logformat.hpp.
|
staticconstexpr |
printf-like format string for octal formatting of numbers
Definition at line 122 of file logformat.hpp.
|
staticconstexpr |
The minimal log level which will be compiled into the application. All log levels below this will be optimized out at compile time.
Definition at line 47 of file logger.hpp.
Referenced by iox2::legacy::log::internal::is_log_level_active().