提交 5e2cd9fe 编写于 作者: guanshengliang's avatar guanshengliang

rename log var names

上级 105f4406
...@@ -22,25 +22,25 @@ extern "C" { ...@@ -22,25 +22,25 @@ extern "C" {
#include "tlog.h" #include "tlog.h"
extern int32_t cdebugFlag; extern int32_t cDebugFlag;
#define tscError(...) \ #define tscError(...) \
if (cdebugFlag & DEBUG_ERROR) { \ if (cDebugFlag & DEBUG_ERROR) { \
taosPrintLog("ERROR TSC ", 255, __VA_ARGS__); \ taosPrintLog("ERROR TSC ", 255, __VA_ARGS__); \
} }
#define tscWarn(...) \ #define tscWarn(...) \
if (cdebugFlag & DEBUG_WARN) { \ if (cDebugFlag & DEBUG_WARN) { \
taosPrintLog("WARN TSC ", cdebugFlag, __VA_ARGS__); \ taosPrintLog("WARN TSC ", cDebugFlag, __VA_ARGS__); \
} }
#define tscTrace(...) \ #define tscTrace(...) \
if (cdebugFlag & DEBUG_TRACE) { \ if (cDebugFlag & DEBUG_TRACE) { \
taosPrintLog("TSC ", cdebugFlag, __VA_ARGS__); \ taosPrintLog("TSC ", cDebugFlag, __VA_ARGS__); \
} }
#define tscPrint(...) \ #define tscPrint(...) \
{ taosPrintLog("TSC ", 255, __VA_ARGS__); } { taosPrintLog("TSC ", 255, __VA_ARGS__); }
#define tscDump(...) \ #define tscDump(...) \
if (cdebugFlag & DEBUG_TRACE) { \ if (cDebugFlag & DEBUG_TRACE) { \
taosPrintLongString("TSC ", cdebugFlag, __VA_ARGS__); \ taosPrintLongString("TSC ", cDebugFlag, __VA_ARGS__); \
} }
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -23,16 +23,16 @@ ...@@ -23,16 +23,16 @@
#include "ttime.h" #include "ttime.h"
#define jniError(...) \ #define jniError(...) \
if (jnidebugFlag & DEBUG_ERROR) { \ if (jniDebugFlag & DEBUG_ERROR) { \
taosPrintLog("ERROR JNI ", jnidebugFlag, __VA_ARGS__); \ taosPrintLog("ERROR JNI ", jniDebugFlag, __VA_ARGS__); \
} }
#define jniWarn(...) \ #define jniWarn(...) \
if (jnidebugFlag & DEBUG_WARN) { \ if (jniDebugFlag & DEBUG_WARN) { \
taosPrintLog("WARN JNI ", jnidebugFlag, __VA_ARGS__); \ taosPrintLog("WARN JNI ", jniDebugFlag, __VA_ARGS__); \
} }
#define jniTrace(...) \ #define jniTrace(...) \
if (jnidebugFlag & DEBUG_TRACE) { \ if (jniDebugFlag & DEBUG_TRACE) { \
taosPrintLog("JNI ", jnidebugFlag, __VA_ARGS__); \ taosPrintLog("JNI ", jniDebugFlag, __VA_ARGS__); \
} }
#define jniPrint(...) \ #define jniPrint(...) \
{ taosPrintLog("JNI ", 255, __VA_ARGS__); } { taosPrintLog("JNI ", 255, __VA_ARGS__); }
......
...@@ -141,9 +141,9 @@ extern int32_t tsAsyncLog; ...@@ -141,9 +141,9 @@ extern int32_t tsAsyncLog;
extern int32_t tsNumOfLogLines; extern int32_t tsNumOfLogLines;
extern int32_t dDebugFlag; extern int32_t dDebugFlag;
extern int32_t vDebugFlag; extern int32_t vDebugFlag;
extern int32_t mdebugFlag; extern int32_t mDebugFlag;
extern int32_t cdebugFlag; extern int32_t cDebugFlag;
extern int32_t jnidebugFlag; extern int32_t jniDebugFlag;
extern int32_t tmrDebugFlag; extern int32_t tmrDebugFlag;
extern int32_t sdbDebugFlag; extern int32_t sdbDebugFlag;
extern int32_t httpDebugFlag; extern int32_t httpDebugFlag;
...@@ -151,8 +151,8 @@ extern int32_t monitorDebugFlag; ...@@ -151,8 +151,8 @@ extern int32_t monitorDebugFlag;
extern int32_t uDebugFlag; extern int32_t uDebugFlag;
extern int32_t rpcDebugFlag; extern int32_t rpcDebugFlag;
extern int32_t debugFlag; extern int32_t debugFlag;
extern int32_t odbcdebugFlag; extern int32_t odbcDebugFlag;
extern int32_t qdebugFlag; extern int32_t qDebugFlag;
extern uint32_t taosMaxTmrCtrl; extern uint32_t taosMaxTmrCtrl;
......
...@@ -127,16 +127,16 @@ int32_t tsRestRowLimit = 10240; ...@@ -127,16 +127,16 @@ int32_t tsRestRowLimit = 10240;
int32_t tsMaxSQLStringLen = TSDB_MAX_SQL_LEN; int32_t tsMaxSQLStringLen = TSDB_MAX_SQL_LEN;
int32_t tsNumOfLogLines = 10000000; int32_t tsNumOfLogLines = 10000000;
int32_t mdebugFlag = 135; int32_t mDebugFlag = 135;
int32_t sdbDebugFlag = 135; int32_t sdbDebugFlag = 135;
int32_t dDebugFlag = 135; int32_t dDebugFlag = 135;
int32_t vDebugFlag = 135; int32_t vDebugFlag = 135;
int32_t cdebugFlag = 135; int32_t cDebugFlag = 135;
int32_t jnidebugFlag = 131; int32_t jniDebugFlag = 131;
int32_t odbcdebugFlag = 131; int32_t odbcDebugFlag = 131;
int32_t httpDebugFlag = 131; int32_t httpDebugFlag = 131;
int32_t monitorDebugFlag = 131; int32_t monitorDebugFlag = 131;
int32_t qdebugFlag = 131; int32_t qDebugFlag = 131;
int32_t rpcDebugFlag = 135; int32_t rpcDebugFlag = 135;
int32_t uDebugFlag = 131; int32_t uDebugFlag = 131;
int32_t debugFlag = 131; int32_t debugFlag = 131;
...@@ -204,19 +204,19 @@ static pthread_once_t tsInitGlobalCfgOnce = PTHREAD_ONCE_INIT; ...@@ -204,19 +204,19 @@ static pthread_once_t tsInitGlobalCfgOnce = PTHREAD_ONCE_INIT;
void taosSetAllDebugFlag() { void taosSetAllDebugFlag() {
for (int32_t i = 0; i < tsGlobalConfigNum; ++i) { for (int32_t i = 0; i < tsGlobalConfigNum; ++i) {
mdebugFlag = debugFlag; mDebugFlag = debugFlag;
sdbDebugFlag = debugFlag; sdbDebugFlag = debugFlag;
dDebugFlag = debugFlag; dDebugFlag = debugFlag;
vDebugFlag = debugFlag; vDebugFlag = debugFlag;
cdebugFlag = debugFlag; cDebugFlag = debugFlag;
jnidebugFlag = debugFlag; jniDebugFlag = debugFlag;
odbcdebugFlag = debugFlag; odbcDebugFlag = debugFlag;
httpDebugFlag = debugFlag; httpDebugFlag = debugFlag;
monitorDebugFlag = debugFlag; monitorDebugFlag = debugFlag;
rpcDebugFlag = debugFlag; rpcDebugFlag = debugFlag;
uDebugFlag = debugFlag; uDebugFlag = debugFlag;
sDebugFlag = debugFlag; sDebugFlag = debugFlag;
//qdebugFlag = debugFlag; //qDebugFlag = debugFlag;
} }
uPrint("all debug flag are set to %d", debugFlag); uPrint("all debug flag are set to %d", debugFlag);
} }
...@@ -1002,7 +1002,7 @@ static void doInitGlobalConfig() { ...@@ -1002,7 +1002,7 @@ static void doInitGlobalConfig() {
taosInitConfigOption(cfg); taosInitConfigOption(cfg);
cfg.option = "mDebugFlag"; cfg.option = "mDebugFlag";
cfg.ptr = &mdebugFlag; cfg.ptr = &mDebugFlag;
cfg.valType = TAOS_CFG_VTYPE_INT32; cfg.valType = TAOS_CFG_VTYPE_INT32;
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_LOG; cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_LOG;
cfg.minValue = 0; cfg.minValue = 0;
...@@ -1062,7 +1062,7 @@ static void doInitGlobalConfig() { ...@@ -1062,7 +1062,7 @@ static void doInitGlobalConfig() {
taosInitConfigOption(cfg); taosInitConfigOption(cfg);
cfg.option = "cDebugFlag"; cfg.option = "cDebugFlag";
cfg.ptr = &cdebugFlag; cfg.ptr = &cDebugFlag;
cfg.valType = TAOS_CFG_VTYPE_INT32; cfg.valType = TAOS_CFG_VTYPE_INT32;
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_LOG | TSDB_CFG_CTYPE_B_CLIENT; cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_LOG | TSDB_CFG_CTYPE_B_CLIENT;
cfg.minValue = 0; cfg.minValue = 0;
...@@ -1072,7 +1072,7 @@ static void doInitGlobalConfig() { ...@@ -1072,7 +1072,7 @@ static void doInitGlobalConfig() {
taosInitConfigOption(cfg); taosInitConfigOption(cfg);
cfg.option = "jniDebugFlag"; cfg.option = "jniDebugFlag";
cfg.ptr = &jnidebugFlag; cfg.ptr = &jniDebugFlag;
cfg.valType = TAOS_CFG_VTYPE_INT32; cfg.valType = TAOS_CFG_VTYPE_INT32;
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_LOG | TSDB_CFG_CTYPE_B_CLIENT; cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_LOG | TSDB_CFG_CTYPE_B_CLIENT;
cfg.minValue = 0; cfg.minValue = 0;
...@@ -1082,7 +1082,7 @@ static void doInitGlobalConfig() { ...@@ -1082,7 +1082,7 @@ static void doInitGlobalConfig() {
taosInitConfigOption(cfg); taosInitConfigOption(cfg);
cfg.option = "odbcDebugFlag"; cfg.option = "odbcDebugFlag";
cfg.ptr = &odbcdebugFlag; cfg.ptr = &odbcDebugFlag;
cfg.valType = TAOS_CFG_VTYPE_INT32; cfg.valType = TAOS_CFG_VTYPE_INT32;
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_LOG | TSDB_CFG_CTYPE_B_CLIENT; cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_LOG | TSDB_CFG_CTYPE_B_CLIENT;
cfg.minValue = 0; cfg.minValue = 0;
...@@ -1122,7 +1122,7 @@ static void doInitGlobalConfig() { ...@@ -1122,7 +1122,7 @@ static void doInitGlobalConfig() {
taosInitConfigOption(cfg); taosInitConfigOption(cfg);
cfg.option = "qDebugFlag"; cfg.option = "qDebugFlag";
cfg.ptr = &qdebugFlag; cfg.ptr = &qDebugFlag;
cfg.valType = TAOS_CFG_VTYPE_INT32; cfg.valType = TAOS_CFG_VTYPE_INT32;
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_LOG | TSDB_CFG_CTYPE_B_CLIENT; cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_LOG | TSDB_CFG_CTYPE_B_CLIENT;
cfg.minValue = 0; cfg.minValue = 0;
......
...@@ -23,13 +23,13 @@ extern "C" { ...@@ -23,13 +23,13 @@ extern "C" {
#include "tlog.h" #include "tlog.h"
#include "monitor.h" #include "monitor.h"
extern int32_t mdebugFlag; extern int32_t mDebugFlag;
extern int32_t sdbDebugFlag; extern int32_t sdbDebugFlag;
// mnode log function // mnode log function
#define mError(...) if (mdebugFlag & DEBUG_ERROR) { taosPrintLog("ERROR MND ", 255, __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 mWarn(...) if (mDebugFlag & DEBUG_WARN) { taosPrintLog("WARN MND ", mDebugFlag, __VA_ARGS__); }
#define mTrace(...) if (mdebugFlag & DEBUG_TRACE) { taosPrintLog("MND ", mdebugFlag, __VA_ARGS__); } #define mTrace(...) if (mDebugFlag & DEBUG_TRACE) { taosPrintLog("MND ", mDebugFlag, __VA_ARGS__); }
#define mPrint(...) { taosPrintLog("MND ", 255, __VA_ARGS__); } #define mPrint(...) { taosPrintLog("MND ", 255, __VA_ARGS__); }
#define mLError(...) monitorSaveLog(2, __VA_ARGS__); mError(__VA_ARGS__) #define mLError(...) monitorSaveLog(2, __VA_ARGS__); mError(__VA_ARGS__)
......
...@@ -22,20 +22,20 @@ extern "C" { ...@@ -22,20 +22,20 @@ extern "C" {
#include "tlog.h" #include "tlog.h"
extern int32_t qdebugFlag; extern int32_t qDebugFlag;
#define qTrace(...) \ #define qTrace(...) \
if (qdebugFlag & DEBUG_TRACE) { \ if (qDebugFlag & DEBUG_TRACE) { \
taosPrintLog("DND QRY ", qdebugFlag, __VA_ARGS__); \ taosPrintLog("DND QRY ", qDebugFlag, __VA_ARGS__); \
} }
#define qError(...) \ #define qError(...) \
if (qdebugFlag & DEBUG_ERROR) { \ if (qDebugFlag & DEBUG_ERROR) { \
taosPrintLog("ERROR QRY ", qdebugFlag, __VA_ARGS__); \ taosPrintLog("ERROR QRY ", qDebugFlag, __VA_ARGS__); \
} }
#define qWarn(...) \ #define qWarn(...) \
if (qdebugFlag & DEBUG_WARN) { \ if (qDebugFlag & DEBUG_WARN) { \
taosPrintLog("WARN QRY ", qdebugFlag, __VA_ARGS__); \ taosPrintLog("WARN QRY ", qDebugFlag, __VA_ARGS__); \
} }
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -236,7 +236,7 @@ void taosReadGlobalLogCfg() { ...@@ -236,7 +236,7 @@ void taosReadGlobalLogCfg() {
int olen, vlen; int olen, vlen;
char fileName[PATH_MAX] = {0}; char fileName[PATH_MAX] = {0};
mdebugFlag = 135; mDebugFlag = 135;
sdbDebugFlag = 135; sdbDebugFlag = 135;
wordexp_t full_path; wordexp_t full_path;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册