diff --git a/src/client/inc/tscLog.h b/src/client/inc/tscLog.h index e82b82412397fea07e1089b56e135ff6f16f40bb..346e1a67957597a4fac8e289aab3691a29b864da 100644 --- a/src/client/inc/tscLog.h +++ b/src/client/inc/tscLog.h @@ -22,25 +22,25 @@ extern "C" { #include "tlog.h" -extern int32_t cdebugFlag; +extern int32_t cDebugFlag; #define tscError(...) \ - if (cdebugFlag & DEBUG_ERROR) { \ + if (cDebugFlag & DEBUG_ERROR) { \ taosPrintLog("ERROR TSC ", 255, __VA_ARGS__); \ } #define tscWarn(...) \ - if (cdebugFlag & DEBUG_WARN) { \ - taosPrintLog("WARN TSC ", cdebugFlag, __VA_ARGS__); \ + if (cDebugFlag & DEBUG_WARN) { \ + taosPrintLog("WARN TSC ", cDebugFlag, __VA_ARGS__); \ } #define tscTrace(...) \ - if (cdebugFlag & DEBUG_TRACE) { \ - taosPrintLog("TSC ", cdebugFlag, __VA_ARGS__); \ + if (cDebugFlag & DEBUG_TRACE) { \ + taosPrintLog("TSC ", cDebugFlag, __VA_ARGS__); \ } #define tscPrint(...) \ { taosPrintLog("TSC ", 255, __VA_ARGS__); } #define tscDump(...) \ - if (cdebugFlag & DEBUG_TRACE) { \ - taosPrintLongString("TSC ", cdebugFlag, __VA_ARGS__); \ + if (cDebugFlag & DEBUG_TRACE) { \ + taosPrintLongString("TSC ", cDebugFlag, __VA_ARGS__); \ } #ifdef __cplusplus diff --git a/src/client/src/TSDBJNIConnector.c b/src/client/src/TSDBJNIConnector.c index 05b7a2be1e7091259fc3549264ab0082212bcc71..812c197ef7923a27a41fa8a37cb1d0bd5834ba4c 100644 --- a/src/client/src/TSDBJNIConnector.c +++ b/src/client/src/TSDBJNIConnector.c @@ -23,16 +23,16 @@ #include "ttime.h" #define jniError(...) \ - if (jnidebugFlag & DEBUG_ERROR) { \ - taosPrintLog("ERROR JNI ", jnidebugFlag, __VA_ARGS__); \ + if (jniDebugFlag & DEBUG_ERROR) { \ + taosPrintLog("ERROR JNI ", jniDebugFlag, __VA_ARGS__); \ } #define jniWarn(...) \ - if (jnidebugFlag & DEBUG_WARN) { \ - taosPrintLog("WARN JNI ", jnidebugFlag, __VA_ARGS__); \ + if (jniDebugFlag & DEBUG_WARN) { \ + taosPrintLog("WARN JNI ", jniDebugFlag, __VA_ARGS__); \ } #define jniTrace(...) \ - if (jnidebugFlag & DEBUG_TRACE) { \ - taosPrintLog("JNI ", jnidebugFlag, __VA_ARGS__); \ + if (jniDebugFlag & DEBUG_TRACE) { \ + taosPrintLog("JNI ", jniDebugFlag, __VA_ARGS__); \ } #define jniPrint(...) \ { taosPrintLog("JNI ", 255, __VA_ARGS__); } diff --git a/src/common/inc/tglobal.h b/src/common/inc/tglobal.h index 05afbab642c6288ad00456949685fea64e7e6297..b077f40945bc3661a214d344249d083b2f2ced2e 100644 --- a/src/common/inc/tglobal.h +++ b/src/common/inc/tglobal.h @@ -141,9 +141,9 @@ extern int32_t tsAsyncLog; extern int32_t tsNumOfLogLines; extern int32_t dDebugFlag; extern int32_t vDebugFlag; -extern int32_t mdebugFlag; -extern int32_t cdebugFlag; -extern int32_t jnidebugFlag; +extern int32_t mDebugFlag; +extern int32_t cDebugFlag; +extern int32_t jniDebugFlag; extern int32_t tmrDebugFlag; extern int32_t sdbDebugFlag; extern int32_t httpDebugFlag; @@ -151,8 +151,8 @@ extern int32_t monitorDebugFlag; extern int32_t uDebugFlag; extern int32_t rpcDebugFlag; extern int32_t debugFlag; -extern int32_t odbcdebugFlag; -extern int32_t qdebugFlag; +extern int32_t odbcDebugFlag; +extern int32_t qDebugFlag; extern uint32_t taosMaxTmrCtrl; diff --git a/src/common/src/tglobal.c b/src/common/src/tglobal.c index 991c1b403bffa059ed70803caae40d83750040e0..90637265b322b6d429c2c39f6b2f2935acee10ca 100644 --- a/src/common/src/tglobal.c +++ b/src/common/src/tglobal.c @@ -127,16 +127,16 @@ int32_t tsRestRowLimit = 10240; int32_t tsMaxSQLStringLen = TSDB_MAX_SQL_LEN; int32_t tsNumOfLogLines = 10000000; -int32_t mdebugFlag = 135; +int32_t mDebugFlag = 135; int32_t sdbDebugFlag = 135; int32_t dDebugFlag = 135; int32_t vDebugFlag = 135; -int32_t cdebugFlag = 135; -int32_t jnidebugFlag = 131; -int32_t odbcdebugFlag = 131; +int32_t cDebugFlag = 135; +int32_t jniDebugFlag = 131; +int32_t odbcDebugFlag = 131; int32_t httpDebugFlag = 131; int32_t monitorDebugFlag = 131; -int32_t qdebugFlag = 131; +int32_t qDebugFlag = 131; int32_t rpcDebugFlag = 135; int32_t uDebugFlag = 131; int32_t debugFlag = 131; @@ -204,19 +204,19 @@ static pthread_once_t tsInitGlobalCfgOnce = PTHREAD_ONCE_INIT; void taosSetAllDebugFlag() { for (int32_t i = 0; i < tsGlobalConfigNum; ++i) { - mdebugFlag = debugFlag; + mDebugFlag = debugFlag; sdbDebugFlag = debugFlag; dDebugFlag = debugFlag; vDebugFlag = debugFlag; - cdebugFlag = debugFlag; - jnidebugFlag = debugFlag; - odbcdebugFlag = debugFlag; + cDebugFlag = debugFlag; + jniDebugFlag = debugFlag; + odbcDebugFlag = debugFlag; httpDebugFlag = debugFlag; monitorDebugFlag = debugFlag; rpcDebugFlag = debugFlag; uDebugFlag = debugFlag; sDebugFlag = debugFlag; - //qdebugFlag = debugFlag; + //qDebugFlag = debugFlag; } uPrint("all debug flag are set to %d", debugFlag); } @@ -1002,7 +1002,7 @@ static void doInitGlobalConfig() { taosInitConfigOption(cfg); cfg.option = "mDebugFlag"; - cfg.ptr = &mdebugFlag; + cfg.ptr = &mDebugFlag; cfg.valType = TAOS_CFG_VTYPE_INT32; cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_LOG; cfg.minValue = 0; @@ -1062,7 +1062,7 @@ static void doInitGlobalConfig() { taosInitConfigOption(cfg); cfg.option = "cDebugFlag"; - cfg.ptr = &cdebugFlag; + cfg.ptr = &cDebugFlag; cfg.valType = TAOS_CFG_VTYPE_INT32; cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_LOG | TSDB_CFG_CTYPE_B_CLIENT; cfg.minValue = 0; @@ -1072,7 +1072,7 @@ static void doInitGlobalConfig() { taosInitConfigOption(cfg); cfg.option = "jniDebugFlag"; - cfg.ptr = &jnidebugFlag; + cfg.ptr = &jniDebugFlag; cfg.valType = TAOS_CFG_VTYPE_INT32; cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_LOG | TSDB_CFG_CTYPE_B_CLIENT; cfg.minValue = 0; @@ -1082,7 +1082,7 @@ static void doInitGlobalConfig() { taosInitConfigOption(cfg); cfg.option = "odbcDebugFlag"; - cfg.ptr = &odbcdebugFlag; + cfg.ptr = &odbcDebugFlag; cfg.valType = TAOS_CFG_VTYPE_INT32; cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_LOG | TSDB_CFG_CTYPE_B_CLIENT; cfg.minValue = 0; @@ -1122,7 +1122,7 @@ static void doInitGlobalConfig() { taosInitConfigOption(cfg); cfg.option = "qDebugFlag"; - cfg.ptr = &qdebugFlag; + cfg.ptr = &qDebugFlag; cfg.valType = TAOS_CFG_VTYPE_INT32; cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_LOG | TSDB_CFG_CTYPE_B_CLIENT; cfg.minValue = 0; diff --git a/src/mnode/inc/mgmtInt.h b/src/mnode/inc/mgmtInt.h index 17553ade721dd526717220033c3a212eec6f4e1a..a83d5beee0659b9ce0c752388bda3efe6871cda2 100644 --- a/src/mnode/inc/mgmtInt.h +++ b/src/mnode/inc/mgmtInt.h @@ -23,13 +23,13 @@ extern "C" { #include "tlog.h" #include "monitor.h" -extern int32_t mdebugFlag; +extern int32_t mDebugFlag; extern int32_t sdbDebugFlag; // mnode log function -#define mError(...) if (mdebugFlag & DEBUG_ERROR) { taosPrintLog("ERROR MND ", 255, __VA_ARGS__); } -#define mWarn(...) if (mdebugFlag & DEBUG_WARN) { taosPrintLog("WARN MND ", mdebugFlag, __VA_ARGS__); } -#define mTrace(...) if (mdebugFlag & DEBUG_TRACE) { taosPrintLog("MND ", mdebugFlag, __VA_ARGS__); } +#define mError(...) if (mDebugFlag & DEBUG_ERROR) { taosPrintLog("ERROR MND ", 255, __VA_ARGS__); } +#define mWarn(...) if (mDebugFlag & DEBUG_WARN) { taosPrintLog("WARN MND ", mDebugFlag, __VA_ARGS__); } +#define mTrace(...) if (mDebugFlag & DEBUG_TRACE) { taosPrintLog("MND ", mDebugFlag, __VA_ARGS__); } #define mPrint(...) { taosPrintLog("MND ", 255, __VA_ARGS__); } #define mLError(...) monitorSaveLog(2, __VA_ARGS__); mError(__VA_ARGS__) diff --git a/src/query/inc/queryLog.h b/src/query/inc/queryLog.h index 2c77ee6032afa9033f909d68a59d6658028f9988..4894d67e0415d57ceb7bd3fed6499cd4fad1658c 100644 --- a/src/query/inc/queryLog.h +++ b/src/query/inc/queryLog.h @@ -22,20 +22,20 @@ extern "C" { #include "tlog.h" -extern int32_t qdebugFlag; +extern int32_t qDebugFlag; #define qTrace(...) \ - if (qdebugFlag & DEBUG_TRACE) { \ - taosPrintLog("DND QRY ", qdebugFlag, __VA_ARGS__); \ + if (qDebugFlag & DEBUG_TRACE) { \ + taosPrintLog("DND QRY ", qDebugFlag, __VA_ARGS__); \ } #define qError(...) \ - if (qdebugFlag & DEBUG_ERROR) { \ - taosPrintLog("ERROR QRY ", qdebugFlag, __VA_ARGS__); \ + if (qDebugFlag & DEBUG_ERROR) { \ + taosPrintLog("ERROR QRY ", qDebugFlag, __VA_ARGS__); \ } #define qWarn(...) \ - if (qdebugFlag & DEBUG_WARN) { \ - taosPrintLog("WARN QRY ", qdebugFlag, __VA_ARGS__); \ + if (qDebugFlag & DEBUG_WARN) { \ + taosPrintLog("WARN QRY ", qDebugFlag, __VA_ARGS__); \ } #ifdef __cplusplus diff --git a/src/util/src/tconfig.c b/src/util/src/tconfig.c index dfbdc5e35d7a5f7953d568c3e57a773c316b0159..61ae647bf4a1f4a75c1aa10ed6340eae848b3719 100644 --- a/src/util/src/tconfig.c +++ b/src/util/src/tconfig.c @@ -236,7 +236,7 @@ void taosReadGlobalLogCfg() { int olen, vlen; char fileName[PATH_MAX] = {0}; - mdebugFlag = 135; + mDebugFlag = 135; sdbDebugFlag = 135; wordexp_t full_path;