16 #ifndef IOX_UTILS_LOG_LOGGING_HPP
17 #define IOX_UTILS_LOG_LOGGING_HPP
19 #include "iceoryx_utils/log/logcommon.hpp"
20 #include "iceoryx_utils/log/logger.hpp"
21 #include "iceoryx_utils/log/logstream.hpp"
30 Logger& CreateLogger(std::string ctxId, std::string ctxDescription, LogLevel appDefLogLevel = LogLevel::kWarn) noexcept;
32 inline constexpr LogHex8 HexFormat(uint8_t value)
34 return LogHex8(value);
36 inline constexpr LogHex8 HexFormat(int8_t value)
38 return LogHex8(
static_cast<uint8_t
>(value));
40 inline constexpr LogHex16 HexFormat(uint16_t value)
42 return LogHex16(value);
44 inline constexpr LogHex16 HexFormat(int16_t value)
46 return LogHex16(
static_cast<uint16_t
>(value));
48 inline constexpr LogHex32 HexFormat(uint32_t value)
50 return LogHex32(value);
52 inline constexpr LogHex32 HexFormat(int32_t value)
54 return LogHex32(
static_cast<uint32_t
>(value));
56 inline constexpr LogHex64 HexFormat(uint64_t value)
58 return LogHex64(value);
60 inline constexpr LogHex64 HexFormat(int64_t value)
62 return LogHex64(
static_cast<uint64_t
>(value));
65 inline constexpr LogBin8 BinFormat(uint8_t value)
67 return LogBin8(value);
69 inline constexpr LogBin8 BinFormat(int8_t value)
71 return LogBin8(
static_cast<uint8_t
>(value));
73 inline constexpr LogBin16 BinFormat(uint16_t value)
75 return LogBin16(value);
77 inline constexpr LogBin16 BinFormat(int16_t value)
79 return LogBin16(
static_cast<uint16_t
>(value));
81 inline constexpr LogBin32 BinFormat(uint32_t value)
83 return LogBin32(value);
85 inline constexpr LogBin32 BinFormat(int32_t value)
87 return LogBin32(
static_cast<uint32_t
>(value));
89 inline constexpr LogBin64 BinFormat(uint64_t value)
91 return LogBin64(value);
93 inline constexpr LogBin64 BinFormat(int64_t value)
95 return LogBin64(
static_cast<uint64_t
>(value));
98 template <typename T, typename std::enable_if<!std::is_pointer<T>::value, std::nullptr_t>::type =
nullptr>
99 inline constexpr LogRawBuffer RawBuffer(
const T& value) noexcept
103 return LogRawBuffer{
reinterpret_cast<const uint8_t*
>(&value),
sizeof(T)};
building block to easily create free function for logging in a library context
Definition: lockfree_queue.hpp:28