A log object to stream messages. More...
#include <cvb/telemetry/log.hpp>
Inherits AttributeMap.
Public Member Functions | |
operator bool () const noexcept | |
Operator to evaluate as bool. | |
template<typename T, typename = typename std::enable_if<is_ostreamable<T>::value>::type> | |
Log & | operator<< (const T &value) |
Operator for types compatible with std::ostream. | |
![]() | |
AttributeMap & | operator() (const std::string &key, const Char *value) |
Specialization for Cvb::Char*. | |
AttributeMap & | operator() (const std::string &key, void *value) |
Specialization for void*. | |
template<> | |
AttributeMap & | operator() (const std::string &key, const double &value) |
Specialization for double. | |
template<> | |
AttributeMap & | operator() (const std::string &key, const float &value) |
Specialization for float. | |
template<> | |
AttributeMap & | operator() (const std::string &key, const String &value) |
Specialization for Cvb::String. | |
template<> | |
AttributeMap & | operator() (const std::string &key, const bool &value) |
Specialization for bool. | |
template<> | |
AttributeMap & | operator() (const std::string &key, const int8_t &value) |
Specialization for int8_t. | |
template<> | |
AttributeMap & | operator() (const std::string &key, const uint8_t &value) |
Specialization for uint8_t. | |
template<> | |
AttributeMap & | operator() (const std::string &key, const int16_t &value) |
Specialization for int16_t. | |
template<> | |
AttributeMap & | operator() (const std::string &key, const uint16_t &value) |
Specialization for uint16_t. | |
template<> | |
AttributeMap & | operator() (const std::string &key, const int32_t &value) |
Specialization for int32_t. | |
template<> | |
AttributeMap & | operator() (const std::string &key, const uint32_t &value) |
Specialization for uint32_t. | |
template<> | |
AttributeMap & | operator() (const std::string &key, const int64_t &value) |
Specialization for int64_t. | |
template<> | |
AttributeMap & | operator() (const std::string &key, const uint64_t &value) |
Specialization for uint64_t. | |
Static Public Member Functions | |
static Log | Create () |
Creates a dummy log. | |
static Log | Create (LogLevel logLevel) |
Creates a log with the given log level. | |
A log object to stream messages.
Log objects are created to stream messages. They support all std::ostream compatible types.
|
inlinestatic |
Creates a dummy log.
Does | not throw any exception. |
A dummy log will evaluate to false. and perform only NOPs. Dummy logs are used when logging is deactivated.
Creates a log with the given log level.
[in] | logLevel | The log level. |
Does | not throw any exception. |
Log object to receive a message at the given level.
|
inlineexplicitnoexcept |
Operator to evaluate as bool.
Dummy logs always evaluate to false. Otherwise logs evaluate to true.