7 using LogLevelBaseType = uint8_t;
9 enum class LogLevel : LogLevelBaseType {
18 inline bool operator<(LogLevel a, LogLevel b) {
19 return static_cast<LogLevelBaseType
>(a) > static_cast<LogLevelBaseType>(b);
21 inline bool operator>(LogLevel a, LogLevel b) {
22 return static_cast<LogLevelBaseType
>(a) < static_cast<LogLevelBaseType>(b);
24 inline bool operator<=(LogLevel a, LogLevel b) {
25 return static_cast<LogLevelBaseType
>(a) >= static_cast<LogLevelBaseType>(b);
27 inline bool operator>=(LogLevel a, LogLevel b) {
28 return static_cast<LogLevelBaseType
>(a) <= static_cast<LogLevelBaseType>(b);
34 #define XLogLevelTraits(level_, string_) \
35 template <> struct LogLevelTrait<LogLevel::level_> { \
36 static constexpr char const* string = string_; \
39 XLogLevelTraits(Critical,
"CRIT")
40 XLogLevelTraits(Error, "ERROR")
41 XLogLevelTraits(Warning, "WARN")
42 XLogLevelTraits(Notice, "NOTE")
43 XLogLevelTraits(Info, "INFO")
44 XLogLevelTraits(Debug, "DEBUG")
46 #undef XLogLevelTraits
Definition: LogLevel.hpp:32