|
iceoryx2
C++ Bindings
|
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...
#include <logstream.hpp>
Public Member Functions | |
| LogStream (Logger &logger, const bb::detail::SourceLocation location, const LogLevel logLevel) noexcept | |
| Constructor for a LogStream object with an externally provided logger. | |
| LogStream (const bb::detail::SourceLocation location, const LogLevel logLevel) noexcept | |
| Constructor for a LogStream object with the logger from iox2::legacy::log::Logger::get. | |
| virtual | ~LogStream () noexcept |
| LogStream (const LogStream &)=delete | |
| LogStream (LogStream &&)=delete | |
| LogStream & | operator= (const LogStream &)=delete |
| LogStream & | operator= (LogStream &&)=delete |
| LogStream & | self () noexcept |
| Helper function to convert a r-value reference into a l-value reference in order to be able to extend the data types which can be logged with LogStream object. Without this, one would need to always log a builtin type before a custom type could be logged. | |
| LogStream & | operator<< (const char *cstr) noexcept |
| Logging support for C-style strings. | |
| LogStream & | operator<< (const std::string &str) noexcept |
| Logging support for std::string. | |
| LogStream & | operator<< (const bool val) noexcept |
| Logging support for 'boolean'. | |
| LogStream & | operator<< (const char val) noexcept |
| Logging support for 'char'. | |
| LogStream & | operator<< (const signed char val) noexcept |
| Logging support for 'signed char'. | |
| LogStream & | operator<< (const unsigned char val) noexcept |
| Logging support for 'unsigned char'. | |
| LogStream & | operator<< (const short val) noexcept |
| Logging support for 'short'. | |
| LogStream & | operator<< (const unsigned short val) noexcept |
| Logging support for 'unsigned short'. | |
| LogStream & | operator<< (const int val) noexcept |
| Logging support for 'int'. | |
| LogStream & | operator<< (const unsigned int val) noexcept |
| Logging support for 'unsigned int'. | |
| LogStream & | operator<< (const long val) noexcept |
| Logging support for 'long'. | |
| LogStream & | operator<< (const unsigned long val) noexcept |
| Logging support for 'unsigned long'. | |
| LogStream & | operator<< (const long long val) noexcept |
| Logging support for 'long long'. | |
| LogStream & | operator<< (const unsigned long long val) noexcept |
| Logging support for 'unsigned long long'. | |
| LogStream & | operator<< (const float val) noexcept |
| Logging support for 'float'. | |
| LogStream & | operator<< (const double val) noexcept |
| Logging support for 'double'. | |
| LogStream & | operator<< (const long double val) noexcept |
| Logging support for 'long double'. | |
| template<typename T, typename std::enable_if_t< std::is_integral< T >::value, bool > = 0> | |
| LogStream & | operator<< (const LogHex< T > &&val) noexcept |
| Logging support for integral numbers in hexadecimal format. | |
| template<typename T, typename std::enable_if_t< std::is_floating_point< T >::value, bool > = 0> | |
| LogStream & | operator<< (const LogHex< T > &&val) noexcept |
| Logging support for floating point numbers in hexadecimal format. | |
| LogStream & | operator<< (const LogHex< const void *const > &&val) noexcept |
| Logging support for pointer in hexadecimal format. | |
| template<typename T, typename std::enable_if_t< std::is_integral< T >::value, bool > = 0> | |
| LogStream & | operator<< (const LogOct< T > &&val) noexcept |
| Logging support for integral numbers in octal format. | |
| template<typename T, typename std::enable_if_t< std::is_integral< T >::value, bool > = 0> | |
| LogStream & | operator<< (const LogBin< T > &&val) noexcept |
| Logging support for integral numbers in binary format. | |
| LogStream & | operator<< (const LogRaw &&val) noexcept |
| Logging support for data in raw bytes. | |
| template<typename Callable, typename = std::enable_if_t<is_invocable_r<LogStream&, Callable, LogStream&>::value>> | |
| LogStream & | operator<< (const Callable &c) noexcept |
| Logging support for callable. This gives access to the LogStream instance which e.g. can be used in a loop. | |
| LogStream & | operator<< (const LogLevel value) noexcept |
| Logging support for LogLevel. | |
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.
Definition at line 189 of file logstream.hpp.
|
noexcept |
Constructor for a LogStream object with an externally provided logger.
| [in] | logger | to be used by the LogStream instance |
| [in] | location | the source location of the log message |
| [in] | logLevel | is the log level for the log message |
Referenced by LogStream(), LogStream(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator=(), operator=(), and self().
|
noexcept |
Constructor for a LogStream object with the logger from iox2::legacy::log::Logger::get.
| [in] | location | the source location of the log message |
| [in] | logLevel | is the log level for the log message |
|
virtualnoexcept |
|
delete |
References LogStream().
|
delete |
References LogStream().
|
noexcept |
Logging support for 'boolean'.
| [in] | val | is the 'boolean' to log |
References LogStream().
|
noexcept |
Logging support for callable. This gives access to the LogStream instance which e.g. can be used in a loop.
in] Callable with a signature 'iox2::legacy::log::LogStream&(iox2::legacy::log::LogStream&)'
| [in] | c | is the callable which receives a LogStream object for the actual logging for(const auto& num: {13, 37, 42, 73}) {
stream << num << " ";
}
return stream;
});
|
References LogStream().
|
noexcept |
Logging support for C-style strings.
| [in] | cstr | is the C-style string to log |
References LogStream().
|
noexcept |
Logging support for 'char'.
| [in] | val | is the 'char' to log |
References LogStream().
|
noexcept |
Logging support for 'double'.
| [in] | val | is the 'double' to log |
References LogStream().
|
noexcept |
Logging support for 'float'.
| [in] | val | is the 'float' to log |
References LogStream().
|
noexcept |
Logging support for 'int'.
| [in] | val | is the 'int' to log |
References LogStream().
|
noexcept |
Logging support for integral numbers in binary format.
in] T is the integral data type of the value to log
| [in] | val | is the value to log |
References LogStream().
|
noexcept |
Logging support for pointer in hexadecimal format.
| [in] | val | is the pointer to log |
References LogStream().
|
noexcept |
Logging support for floating point numbers in hexadecimal format.
in] T is the floating point data type of the value to log
| [in] | val | is the value to log |
References LogStream().
|
noexcept |
Logging support for integral numbers in hexadecimal format.
in] T is the integral data type of the value to log
| [in] | val | is the value to log |
References LogStream().
Logging support for LogLevel.
| [in] | value | is the LogLevel to log |
References LogStream().
|
noexcept |
Logging support for integral numbers in octal format.
in] T is the integral data type of the value to log
| [in] | val | is the value to log |
References LogStream().
Logging support for data in raw bytes.
| [in] | val | is the value to log |
References LogStream().
|
noexcept |
Logging support for 'long double'.
| [in] | val | is the 'long double' to log |
References LogStream().
|
noexcept |
Logging support for 'long long'.
| [in] | val | is the 'long long' to log |
References LogStream().
|
noexcept |
Logging support for 'long'.
| [in] | val | is the 'long' to log |
References LogStream().
|
noexcept |
Logging support for 'short'.
| [in] | val | is the 'short' to log |
References LogStream().
|
noexcept |
Logging support for 'signed char'.
| [in] | val | is the 'signed char' to log |
References LogStream().
|
noexcept |
Logging support for std::string.
| [in] | str | is the std::string to log |
References LogStream().
|
noexcept |
Logging support for 'unsigned char'.
| [in] | val | is the 'unsigned char' to log |
References LogStream().
|
noexcept |
Logging support for 'unsigned int'.
| [in] | val | is the 'unsigned int' to log |
References LogStream().
|
noexcept |
Logging support for 'unsigned long long'.
| [in] | val | is the 'unsigned long long' to log |
References LogStream().
|
noexcept |
Logging support for 'unsigned long'.
| [in] | val | is the 'unsigned long' to log |
References LogStream().
|
noexcept |
Logging support for 'unsigned short'.
| [in] | val | is the 'unsigned short' to log |
References LogStream().
References LogStream().
References LogStream().
|
noexcept |
Helper function to convert a r-value reference into a l-value reference in order to be able to extend the data types which can be logged with LogStream object. Without this, one would need to always log a builtin type before a custom type could be logged.
References LogStream(), and self().
Referenced by self().