Remove log level FATA.
This commit is contained in:
+1
-1
@@ -20,7 +20,7 @@ if(WIN32)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(WEBCC_ENABLE_LOG 1 CACHE STRING "Enable logging? (1:Yes, 0:No)")
|
set(WEBCC_ENABLE_LOG 1 CACHE STRING "Enable logging? (1:Yes, 0:No)")
|
||||||
set(WEBCC_LOG_LEVEL 2 CACHE STRING "Log level (0:VERB, 1:INFO, 2:WARN, 3:ERRO or 4:FATA)")
|
set(WEBCC_LOG_LEVEL 2 CACHE STRING "Log level (0:VERB, 1:INFO, 2:WARN or 3:ERRO)")
|
||||||
|
|
||||||
set(WEBCC_ENABLE_SSL 0 CACHE STRING "Enable SSL/HTTPS (need OpenSSL)? (1:Yes, 0:No)")
|
set(WEBCC_ENABLE_SSL 0 CACHE STRING "Enable SSL/HTTPS (need OpenSSL)? (1:Yes, 0:No)")
|
||||||
set(WEBCC_ENABLE_GZIP 0 CACHE STRING "Enable gzip compression (need Zlib)? (1:Yes, 0:No)")
|
set(WEBCC_ENABLE_GZIP 0 CACHE STRING "Enable gzip compression (need Zlib)? (1:Yes, 0:No)")
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
#define WEBCC_ENABLE_LOG 1
|
#define WEBCC_ENABLE_LOG 1
|
||||||
|
|
||||||
#if WEBCC_ENABLE_LOG
|
#if WEBCC_ENABLE_LOG
|
||||||
// 0:VERB, 1:INFO, 2:WARN, 3:ERRO or 4:FATA
|
// 0:VERB, 1:INFO, 2:WARN or 3:ERRO
|
||||||
#define WEBCC_LOG_LEVEL 2
|
#define WEBCC_LOG_LEVEL 2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -9,7 +9,7 @@
|
|||||||
#define WEBCC_ENABLE_LOG @WEBCC_ENABLE_LOG@
|
#define WEBCC_ENABLE_LOG @WEBCC_ENABLE_LOG@
|
||||||
|
|
||||||
#if WEBCC_ENABLE_LOG
|
#if WEBCC_ENABLE_LOG
|
||||||
// 0:VERB, 1:INFO, 2:WARN, 3:ERRO or 4:FATA
|
// 0:VERB, 1:INFO, 2:WARN or 3:ERRO
|
||||||
#define WEBCC_LOG_LEVEL @WEBCC_LOG_LEVEL@
|
#define WEBCC_LOG_LEVEL @WEBCC_LOG_LEVEL@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
#define WEBCC_INFO 1
|
#define WEBCC_INFO 1
|
||||||
#define WEBCC_WARN 2
|
#define WEBCC_WARN 2
|
||||||
#define WEBCC_ERRO 3
|
#define WEBCC_ERRO 3
|
||||||
#define WEBCC_FATA 4
|
|
||||||
|
|
||||||
// Default log level.
|
// Default log level.
|
||||||
#ifndef WEBCC_LOG_LEVEL
|
#ifndef WEBCC_LOG_LEVEL
|
||||||
@@ -84,13 +83,6 @@ void Log(int level, const char* file, int line, const char* format, ...);
|
|||||||
#define LOG_ERRO(format, ...)
|
#define LOG_ERRO(format, ...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if WEBCC_LOG_LEVEL <= WEBCC_FATA
|
|
||||||
#define LOG_FATA(format, ...) \
|
|
||||||
webcc::Log(WEBCC_FATA, __FILENAME__, __LINE__, format, ##__VA_ARGS__);
|
|
||||||
#else
|
|
||||||
#define LOG_FATA(format, ...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
// See: https://stackoverflow.com/a/8488201
|
// See: https://stackoverflow.com/a/8488201
|
||||||
@@ -124,13 +116,6 @@ void Log(int level, const char* file, int line, const char* format, ...);
|
|||||||
#define LOG_ERRO(format, args...)
|
#define LOG_ERRO(format, args...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if WEBCC_LOG_LEVEL <= WEBCC_FATA
|
|
||||||
#define LOG_FATA(format, args...) \
|
|
||||||
webcc::Log(WEBCC_FATA, __FILENAME__, __LINE__, format, ##args);
|
|
||||||
#else
|
|
||||||
#define LOG_FATA(format, args...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // defined(WIN32) || defined(_WIN64)
|
#endif // defined(WIN32) || defined(_WIN64)
|
||||||
|
|
||||||
#else // WEBCC_ENABLE_LOG == 0
|
#else // WEBCC_ENABLE_LOG == 0
|
||||||
@@ -142,13 +127,11 @@ void Log(int level, const char* file, int line, const char* format, ...);
|
|||||||
#define LOG_INFO(format, ...)
|
#define LOG_INFO(format, ...)
|
||||||
#define LOG_WARN(format, ...)
|
#define LOG_WARN(format, ...)
|
||||||
#define LOG_ERRO(format, ...)
|
#define LOG_ERRO(format, ...)
|
||||||
#define LOG_FATA(format, ...)
|
|
||||||
#else
|
#else
|
||||||
#define LOG_VERB(format, args...)
|
#define LOG_VERB(format, args...)
|
||||||
#define LOG_INFO(format, args...)
|
#define LOG_INFO(format, args...)
|
||||||
#define LOG_WARN(format, args...)
|
#define LOG_WARN(format, args...)
|
||||||
#define LOG_ERRO(format, args...)
|
#define LOG_ERRO(format, args...)
|
||||||
#define LOG_FATA(format, args...)
|
|
||||||
#endif // defined(WIN32) || defined(_WIN64)
|
#endif // defined(WIN32) || defined(_WIN64)
|
||||||
|
|
||||||
#endif // WEBCC_ENABLE_LOG
|
#endif // WEBCC_ENABLE_LOG
|
||||||
|
|||||||
Reference in New Issue
Block a user