16 #ifndef IOX_UTILS_LOG_LOGSTREAM_HPP
17 #define IOX_UTILS_LOG_LOGSTREAM_HPP
19 #include "iceoryx_utils/log/logcommon.hpp"
39 constexpr
LogHex8(uint8_t value)
78 constexpr
LogBin8(uint8_t value)
122 LogStream& operator<<(
const char* cstr) noexcept;
124 LogStream& operator<<(
const std::string& str) noexcept;
126 template <typename T, typename std::enable_if<std::is_arithmetic<T>::value,
int>::type = 0>
127 LogStream& operator<<(
const T val) noexcept
129 m_logEntry.message.append(std::to_string(val));
134 template <typename T, typename std::enable_if<std::is_base_of<LogHex, T>::value,
int>::type = 0>
135 LogStream& operator<<(
const T val) noexcept
137 std::stringstream ss;
139 ss <<
"0x" << std::hex << +val.value;
140 m_logEntry.message.append(ss.str());
145 template <typename T, typename std::enable_if<std::is_base_of<LogBin, T>::value,
int>::type = 0>
146 LogStream& operator<<(
const T val) noexcept
148 m_logEntry.message.append(
"0b");
149 m_logEntry.message.append(std::bitset<std::numeric_limits<decltype(val.value)>::digits>(val.value).to_string());
158 bool m_flushed{
false};
Definition: logstream.hpp:114
Definition: logger.hpp:35
building block to easily create free function for logging in a library context
Definition: lockfree_queue.hpp:28
Definition: logstream.hpp:84
Definition: logstream.hpp:92
Definition: logstream.hpp:98
Definition: logstream.hpp:76
Definition: logstream.hpp:72
Definition: logcommon.hpp:70
Definition: logstream.hpp:46
Definition: logstream.hpp:54
Definition: logstream.hpp:62
Definition: logstream.hpp:37
Definition: logstream.hpp:33
Definition: logstream.hpp:106