9 #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
13 #ifndef OPTIONAL_ENUM_CLASS
14 #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
15 #define OPTIONAL_ENUM_CLASS enum class
17 #define OPTIONAL_ENUM_CLASS enum
21 #ifndef OPTIONAL_LOG_LEVEL_SPECIFIER
22 #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
23 #define OPTIONAL_LOG_LEVEL_SPECIFIER LOG_LEVEL::
25 #define OPTIONAL_LOG_LEVEL_SPECIFIER
35 OPTIONAL_ENUM_CLASS LOG_LEVEL {
36 LOG_LEVEL_NONE = 0x0000,
37 LOG_LEVEL_INFO = 0x0001,
38 LOG_LEVEL_WARN = 0x0002,
39 LOG_LEVEL_ERROR = 0x0004,
40 LOG_LEVEL_FATAL = 0x0008,
60 virtual int32_t
writeLog(LOG_LEVEL level,
const char* message, uint16_t length) = 0;
65 enum LOG_FILTER_TYPE {
67 LOG_FILTER_DEBUG = 0x080f,
68 LOG_FILTER_INFO = 0x000f,
69 LOG_FILTER_WARN = 0x000e,
70 LOG_FILTER_ERROR = 0x000c,
71 LOG_FILTER_CRITICAL = 0x0008,
72 LOG_FILTER_MASK = 0x80f,
75 const uint32_t MAX_LOG_SIZE = 20 * 1024 * 1024;
76 const uint32_t MIN_LOG_SIZE = 128 * 1024;
79 const uint32_t DEFAULT_LOG_SIZE_IN_KB = 1024;
100 #undef OPTIONAL_LOG_LEVEL_SPECIFIER