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

rename log var names

上级 105f4406
......@@ -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
......
......@@ -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__); }
......
......@@ -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;
......
......@@ -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;
......
......@@ -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__)
......
......@@ -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
......
......@@ -236,7 +236,7 @@ void taosReadGlobalLogCfg() {
int olen, vlen;
char fileName[PATH_MAX] = {0};
mdebugFlag = 135;
mDebugFlag = 135;
sdbDebugFlag = 135;
wordexp_t full_path;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册