120 LogStream(
Logger& logger, LogLevel logLevel = LogLevel::kWarn)
noexcept;
122 virtual ~LogStream()
noexcept;
124 void Flush()
noexcept;
126 LogStream& operator<<(
const char* cstr)
noexcept;
128 LogStream& operator<<(
const std::string& str)
noexcept;
130 template <typename T, typename std::enable_if<std::is_arithmetic<T>::value,
int>::type = 0>
131 LogStream& operator<<(
const T val)
noexcept
138 template <typename T, typename std::enable_if<std::is_base_of<LogHex, T>::value,
int>::type = 0>
139 LogStream& operator<<(
const T val)
noexcept
141 std::stringstream ss;
143 ss <<
"0x" << std::hex << +val.value;
144 m_logEntry.message.append(ss.str());
149 template <typename T, typename std::enable_if<std::is_base_of<LogBin, T>::value,
int>::type = 0>
150 LogStream& operator<<(
const T val)
noexcept
152 m_logEntry.message.append(
"0b");
153 m_logEntry.message.append(std::bitset<std::numeric_limits<
decltype(val.value)>::digits>(val.value).to_string());
158 LogStream& operator<<(
const LogRawBuffer& value)
noexcept;
162 bool m_flushed{
false};
static std::enable_if<!std::is_convertible< Source, std::string >::value, std::string >::type toString(const Source &t) noexcept
Converts every type which is either a pod (plain old data) type or is convertable to a string (this m...
Definition logcommon.hpp:71