diff --git a/include/util/tlog.h b/include/util/tlog.h index 988d9c6890832d17a7e9acd2b496e3ef6ba63d90..a519aaa9b7e6938dd76ab739ec75b57b8e83917b 100644 --- a/include/util/tlog.h +++ b/include/util/tlog.h @@ -60,7 +60,7 @@ extern int32_t tsdbDebugFlag; extern int32_t tqDebugFlag; extern int32_t fsDebugFlag; extern int32_t metaDebugFlag; -extern int32_t fnDebugFlag; +extern int32_t udfDebugFlag; extern int32_t smaDebugFlag; extern int32_t idxDebugFlag; diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index b104e1c2be58503f805fbefee1896e3077ca0524..5b3993dd4027db3f7a86dad6f28bc5feaed84bf9 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -314,7 +314,7 @@ static int32_t taosAddServerLogCfg(SConfig *pCfg) { if (cfgAddInt32(pCfg, "tsdbDebugFlag", tsdbDebugFlag, 0, 255, 0) != 0) return -1; if (cfgAddInt32(pCfg, "tqDebugFlag", tqDebugFlag, 0, 255, 0) != 0) return -1; if (cfgAddInt32(pCfg, "fsDebugFlag", fsDebugFlag, 0, 255, 0) != 0) return -1; - if (cfgAddInt32(pCfg, "fnDebugFlag", fnDebugFlag, 0, 255, 0) != 0) return -1; + if (cfgAddInt32(pCfg, "udfDebugFlag", udfDebugFlag, 0, 255, 0) != 0) return -1; if (cfgAddInt32(pCfg, "smaDebugFlag", smaDebugFlag, 0, 255, 0) != 0) return -1; if (cfgAddInt32(pCfg, "idxDebugFlag", idxDebugFlag, 0, 255, 0) != 0) return -1; return 0; @@ -504,7 +504,7 @@ static void taosSetServerLogCfg(SConfig *pCfg) { tsdbDebugFlag = cfgGetItem(pCfg, "tsdbDebugFlag")->i32; tqDebugFlag = cfgGetItem(pCfg, "tqDebugFlag")->i32; fsDebugFlag = cfgGetItem(pCfg, "fsDebugFlag")->i32; - fnDebugFlag = cfgGetItem(pCfg, "fnDebugFlag")->i32; + udfDebugFlag = cfgGetItem(pCfg, "udfDebugFlag")->i32; smaDebugFlag = cfgGetItem(pCfg, "smaDebugFlag")->i32; idxDebugFlag = cfgGetItem(pCfg, "idxDebugFlag")->i32; } @@ -715,8 +715,6 @@ int32_t taosSetCfg(SConfig *pCfg, char* name) { cfgSetItem(pCfg, "firstEp", tsFirst, pFirstEpItem->stype); } else if (strcasecmp("fsDebugFlag", name) == 0) { fsDebugFlag = cfgGetItem(pCfg, "fsDebugFlag")->i32; - } else if (strcasecmp("fnDebugFlag", name) == 0) { - fnDebugFlag = cfgGetItem(pCfg, "fnDebugFlag")->i32; } break; } @@ -817,6 +815,8 @@ int32_t taosSetCfg(SConfig *pCfg, char* name) { case 'u': { if (strcasecmp("multiProcess", name) == 0) { tsMultiProcess = cfgGetItem(pCfg, "multiProcess")->bval; + } else if (strcasecmp("udfDebugFlag", name) == 0) { + udfDebugFlag = cfgGetItem(pCfg, "udfDebugFlag")->i32; } break; } diff --git a/source/dnode/mgmt/exe/dmMain.c b/source/dnode/mgmt/exe/dmMain.c index 2b0f6a01a0b87cdee8d071d1e53bad398ea90f97..00c32e19907e488c915d4e10ab6865de603716d3 100644 --- a/source/dnode/mgmt/exe/dmMain.c +++ b/source/dnode/mgmt/exe/dmMain.c @@ -216,7 +216,7 @@ int main(int argc, char const *argv[]) { return -1; } - dInfo("start to open dnode"); + dInfo("start to init service"); dmSetSignalHandle(); int32_t code = dmRun(); dInfo("shutting down the service"); diff --git a/source/dnode/mgmt/mgmt_vnode/src/vmInt.c b/source/dnode/mgmt/mgmt_vnode/src/vmInt.c index dc1bcbd258847ed409fa6e4dd5be25c5a21d8c36..051e5defb0a078325fff22ff45594875bb913ca7 100644 --- a/source/dnode/mgmt/mgmt_vnode/src/vmInt.c +++ b/source/dnode/mgmt/mgmt_vnode/src/vmInt.c @@ -173,7 +173,7 @@ static int32_t vmOpenVnodes(SVnodeMgmt *pMgmt) { pThread->pCfgs[pThread->vnodeNum++] = pCfgs[v]; } - dInfo("start %d threads to open %d vnodes", threadNum, numOfVnodes); + dInfo("open %d vnodes with %d threads", numOfVnodes, threadNum); for (int32_t t = 0; t < threadNum; ++t) { SVnodeThread *pThread = &threads[t]; @@ -204,7 +204,7 @@ static int32_t vmOpenVnodes(SVnodeMgmt *pMgmt) { dError("there are total vnodes:%d, opened:%d", pMgmt->state.totalVnodes, pMgmt->state.openVnodes); return -1; } else { - dInfo("total vnodes:%d open successfully", pMgmt->state.totalVnodes); + dInfo("successfully opened %d vnodes", pMgmt->state.totalVnodes); return 0; } } diff --git a/source/dnode/mgmt/node_mgmt/src/dmMgmt.c b/source/dnode/mgmt/node_mgmt/src/dmMgmt.c index 436282d9fedc03a7ec64d31f77aa6211a0c0f124..c2e8a552717041798dea4f7ac61045eb198c170d 100644 --- a/source/dnode/mgmt/node_mgmt/src/dmMgmt.c +++ b/source/dnode/mgmt/node_mgmt/src/dmMgmt.c @@ -128,7 +128,7 @@ static void dmClearVars(SDnode *pDnode) { } int32_t dmInitDnode(SDnode *pDnode, EDndNodeType rtype) { - dInfo("start to create dnode"); + dDebug("start to create dnode"); int32_t code = -1; char path[PATH_MAX + 100] = {0}; diff --git a/source/dnode/mnode/impl/src/mndSync.c b/source/dnode/mnode/impl/src/mndSync.c index 2053f3886cec48eb1c23690422c28e8e970533f6..d77b39003af05e995b3af2d5d83d4bc437eae467 100644 --- a/source/dnode/mnode/impl/src/mndSync.c +++ b/source/dnode/mnode/impl/src/mndSync.c @@ -188,7 +188,7 @@ int32_t mndInitSync(SMnode *pMnode) { SNodeInfo *pNode = &pCfg->nodeInfo[0]; tstrncpy(pNode->nodeFqdn, pMgmt->replica.fqdn, sizeof(pNode->nodeFqdn)); pNode->nodePort = pMgmt->replica.port; - mInfo("fqdn:%s port:%u", pNode->nodeFqdn, pNode->nodePort); + mInfo("mnode ep:%s:%u", pNode->nodeFqdn, pNode->nodePort); } tsem_init(&pMgmt->syncSem, 0, 0); diff --git a/source/libs/function/inc/fnLog.h b/source/libs/function/inc/fnLog.h index d85dd024331d0b2ec7374079cad9af344368a3c4..d8dd1d1e6767e2dca19f88484e0cd222d216d260 100644 --- a/source/libs/function/inc/fnLog.h +++ b/source/libs/function/inc/fnLog.h @@ -10,12 +10,14 @@ extern "C" { #endif -#define fnFatal(...) { if (fnDebugFlag & DEBUG_FATAL) { taosPrintLog("FN FATAL ", DEBUG_FATAL, 255, __VA_ARGS__); }} -#define fnError(...) { if (fnDebugFlag & DEBUG_ERROR) { taosPrintLog("FN ERROR ", DEBUG_ERROR, 255, __VA_ARGS__); }} -#define fnWarn(...) { if (fnDebugFlag & DEBUG_WARN) { taosPrintLog("FN WARN ", DEBUG_WARN, 255, __VA_ARGS__); }} -#define fnInfo(...) { if (fnDebugFlag & DEBUG_INFO) { taosPrintLog("FN ", DEBUG_INFO, 255, __VA_ARGS__); }} -#define fnDebug(...) { if (fnDebugFlag & DEBUG_DEBUG) { taosPrintLog("FN ", DEBUG_DEBUG, dDebugFlag, __VA_ARGS__); }} -#define fnTrace(...) { if (fnDebugFlag & DEBUG_TRACE) { taosPrintLog("FN ", DEBUG_TRACE, dDebugFlag, __VA_ARGS__); }} +// clang-format off +#define fnFatal(...) { if (udfDebugFlag & DEBUG_FATAL) { taosPrintLog("UDF FATAL ", DEBUG_FATAL, 255, __VA_ARGS__); }} +#define fnError(...) { if (udfDebugFlag & DEBUG_ERROR) { taosPrintLog("UDF ERROR ", DEBUG_ERROR, 255, __VA_ARGS__); }} +#define fnWarn(...) { if (udfDebugFlag & DEBUG_WARN) { taosPrintLog("UDF WARN ", DEBUG_WARN, 255, __VA_ARGS__); }} +#define fnInfo(...) { if (udfDebugFlag & DEBUG_INFO) { taosPrintLog("UDF ", DEBUG_INFO, 255, __VA_ARGS__); }} +#define fnDebug(...) { if (udfDebugFlag & DEBUG_DEBUG) { taosPrintLog("UDF ", DEBUG_DEBUG, udfDebugFlag, __VA_ARGS__); }} +#define fnTrace(...) { if (udfDebugFlag & DEBUG_TRACE) { taosPrintLog("UDF ", DEBUG_TRACE, udfDebugFlag, __VA_ARGS__); }} +// clang-format on #ifdef __cplusplus } diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c index cc6057b031db0e92ed062e26b64973c63e6d5d58..56fc6594ab7c94f5f6de2d084440313c52fc1791 100644 --- a/source/libs/sync/src/syncMain.c +++ b/source/libs/sync/src/syncMain.c @@ -1025,14 +1025,14 @@ SSyncNode* syncNodeOpen(const SSyncInfo* pOldSyncInfo) { pSyncNode->FpOnSnapshotRsp = syncNodeOnSnapshotRspCb; if (pSyncNode->pRaftCfg->snapshotStrategy) { - sInfo("sync node use snapshot"); + sInfo("vgId:%d, sync node use snapshot", pSyncNode->vgId); pSyncNode->FpOnRequestVote = syncNodeOnRequestVoteSnapshotCb; pSyncNode->FpOnRequestVoteReply = syncNodeOnRequestVoteReplySnapshotCb; pSyncNode->FpOnAppendEntries = syncNodeOnAppendEntriesSnapshotCb; pSyncNode->FpOnAppendEntriesReply = syncNodeOnAppendEntriesReplySnapshotCb; } else { - sInfo("sync node do not use snapshot"); + sInfo("vgId:%d, sync node do not use snapshot", pSyncNode->vgId); pSyncNode->FpOnRequestVote = syncNodeOnRequestVoteCb; pSyncNode->FpOnRequestVoteReply = syncNodeOnRequestVoteReplyCb; pSyncNode->FpOnAppendEntries = syncNodeOnAppendEntriesCb; diff --git a/source/util/src/tlog.c b/source/util/src/tlog.c index 0439ed148bdaee8d5fee012eb961d57283e62aaa..9d7656de3585a8d00c3f4f079755fa5496586d21 100644 --- a/source/util/src/tlog.c +++ b/source/util/src/tlog.c @@ -94,7 +94,7 @@ int32_t tdbDebugFlag = 131; int32_t tqDebugFlag = 135; int32_t fsDebugFlag = 135; int32_t metaDebugFlag = 135; -int32_t fnDebugFlag = 135; +int32_t udfDebugFlag = 135; int32_t smaDebugFlag = 135; int32_t idxDebugFlag = 135; @@ -758,7 +758,7 @@ void taosSetAllDebugFlag(int32_t flag) { tsdbDebugFlag = flag; tqDebugFlag = flag; fsDebugFlag = flag; - fnDebugFlag = flag; + udfDebugFlag = flag; smaDebugFlag = flag; idxDebugFlag = flag; diff --git a/tests/script/sh/deploy.sh b/tests/script/sh/deploy.sh index 1deea263379fb837647069bd8adeff6edf4bac58..4d93878a98a2a4fdb4d0c49b5093e0471581f926 100755 --- a/tests/script/sh/deploy.sh +++ b/tests/script/sh/deploy.sh @@ -134,10 +134,14 @@ echo "cDebugFlag 143" >> $TAOS_CFG echo "jniDebugFlag 143" >> $TAOS_CFG echo "qDebugFlag 143" >> $TAOS_CFG echo "rpcDebugFlag 143" >> $TAOS_CFG -echo "tmrDebugFlag 131" >> $TAOS_CFG -echo "uDebugFlag 143" >> $TAOS_CFG echo "sDebugFlag 143" >> $TAOS_CFG echo "wDebugFlag 143" >> $TAOS_CFG +echo "idxDebugFlag 143" >> $TAOS_CFG +echo "fsDebugFlag 143" >> $TAOS_CFG +echo "udfDebugFlag 143" >> $TAOS_CFG +echo "smaDebugFlag 143" >> $TAOS_CFG +echo "tmrDebugFlag 131" >> $TAOS_CFG +echo "uDebugFlag 131" >> $TAOS_CFG echo "numOfLogLines 20000000" >> $TAOS_CFG echo "statusInterval 1" >> $TAOS_CFG echo "asyncLog 0" >> $TAOS_CFG