11 #ifndef OPTIONAL_ENUM_CLASS
12 #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
13 #define OPTIONAL_ENUM_CLASS enum class
15 #define OPTIONAL_ENUM_CLASS enum
19 #ifndef OPTIONAL_LOG_LEVEL_SPECIFIER
20 #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
21 #define OPTIONAL_LOG_LEVEL_SPECIFIER LOG_LEVEL::
23 #define OPTIONAL_LOG_LEVEL_SPECIFIER
33 OPTIONAL_ENUM_CLASS LOG_LEVEL {
34 LOG_LEVEL_NONE = 0x0000,
35 LOG_LEVEL_INFO = 0x0001,
36 LOG_LEVEL_WARN = 0x0002,
37 LOG_LEVEL_ERROR = 0x0004,
38 LOG_LEVEL_FATAL = 0x0008,
39 LOG_LEVEL_API_CALL = 0x0010,
59 virtual int32_t
writeLog(LOG_LEVEL level,
const char* message, uint16_t length) = 0;
64 enum LOG_FILTER_TYPE {
66 LOG_FILTER_DEBUG = 0x080f,
67 LOG_FILTER_INFO = 0x000f,
68 LOG_FILTER_WARN = 0x000e,
69 LOG_FILTER_ERROR = 0x000c,
70 LOG_FILTER_CRITICAL = 0x0008,
71 LOG_FILTER_MASK = 0x80f,
74 const uint32_t MAX_LOG_SIZE = 20 * 1024 * 1024;
75 const uint32_t MIN_LOG_SIZE = 128 * 1024;
78 const uint32_t DEFAULT_LOG_SIZE_IN_KB = 1024;
98 #undef OPTIONAL_LOG_LEVEL_SPECIFIER