From 4f38e00dc88b5b79d74a4d542c930df6b2a251d9 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Sun, 28 Jun 2020 08:02:10 +0000 Subject: [PATCH] [TD-526] align log info --- src/common/src/tglobal.c | 8 ++++---- src/util/src/tlog.c | 4 ++-- src/vnode/src/vnodeMain.c | 8 ++++---- tests/script/sh/deploy.sh | 15 ++++++++++----- 4 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/common/src/tglobal.c b/src/common/src/tglobal.c index ae342f3151..2058cfa7f1 100644 --- a/src/common/src/tglobal.c +++ b/src/common/src/tglobal.c @@ -182,20 +182,20 @@ int32_t tsNumOfLogLines = 10000000; int32_t mDebugFlag = 135; int32_t sdbDebugFlag = 135; int32_t dDebugFlag = 135; -int32_t vDebugFlag = 135; -int32_t cDebugFlag = 135; +int32_t vDebugFlag = 131; +int32_t cDebugFlag = 131; int32_t jniDebugFlag = 131; int32_t odbcDebugFlag = 131; int32_t httpDebugFlag = 131; int32_t mqttDebugFlag = 131; int32_t monitorDebugFlag = 131; int32_t qDebugFlag = 131; -int32_t rpcDebugFlag = 135; +int32_t rpcDebugFlag = 131; int32_t uDebugFlag = 131; int32_t debugFlag = 131; int32_t sDebugFlag = 135; int32_t wDebugFlag = 135; -int32_t tsdbDebugFlag = 135; +int32_t tsdbDebugFlag = 131; static pthread_once_t tsInitGlobalCfgOnce = PTHREAD_ONCE_INIT; diff --git a/src/util/src/tlog.c b/src/util/src/tlog.c index d93a6322f5..c2c56f29db 100644 --- a/src/util/src/tlog.c +++ b/src/util/src/tlog.c @@ -328,7 +328,7 @@ void taosPrintLog(const char *flags, int32_t dflag, const char *format, ...) { curTime = timeSecs.tv_sec; ptm = localtime_r(&curTime, &Tm); - len = sprintf(buffer, "%02d/%02d %02d:%02d:%02d.%06d 0x%" PRIx64 " ", ptm->tm_mon + 1, ptm->tm_mday, ptm->tm_hour, + len = sprintf(buffer, "%02d/%02d %02d:%02d:%02d.%06d 0x%08" PRIx64 " ", ptm->tm_mon + 1, ptm->tm_mday, ptm->tm_hour, ptm->tm_min, ptm->tm_sec, (int32_t)timeSecs.tv_usec, taosGetPthreadId()); len += sprintf(buffer + len, "%s", flags); @@ -415,7 +415,7 @@ void taosPrintLongString(const char *flags, int32_t dflag, const char *format, . curTime = timeSecs.tv_sec; ptm = localtime_r(&curTime, &Tm); - len = sprintf(buffer, "%02d/%02d %02d:%02d:%02d.%06d 0x%" PRIx64 " ", ptm->tm_mon + 1, ptm->tm_mday, ptm->tm_hour, + len = sprintf(buffer, "%02d/%02d %02d:%02d:%02d.%06d 0x%08" PRIx64 " ", ptm->tm_mon + 1, ptm->tm_mday, ptm->tm_hour, ptm->tm_min, ptm->tm_sec, (int32_t)timeSecs.tv_usec, taosGetPthreadId()); len += sprintf(buffer + len, "%s", flags); diff --git a/src/vnode/src/vnodeMain.c b/src/vnode/src/vnodeMain.c index 017c4f5f34..89af7b988d 100644 --- a/src/vnode/src/vnodeMain.c +++ b/src/vnode/src/vnodeMain.c @@ -148,7 +148,7 @@ int32_t vnodeDrop(int32_t vgId) { } SVnodeObj *pVnode = *ppVnode; - vDebug("vgId:%d, vnode will be dropped", pVnode->vgId); + vTrace("vgId:%d, vnode will be dropped, refCount:%d", pVnode->vgId, pVnode->refCount); pVnode->status = TAOS_VN_STATUS_DELETING; vnodeCleanUp(pVnode); @@ -318,7 +318,7 @@ void vnodeRelease(void *pVnodeRaw) { assert(refCount >= 0); if (refCount > 0) { - vDebug("vgId:%d, release vnode, refCount:%d", vgId, refCount); + vTrace("vgId:%d, release vnode, refCount:%d", vgId, refCount); return; } @@ -381,7 +381,7 @@ void *vnodeAccquireVnode(int32_t vgId) { if (pVnode == NULL) return pVnode; atomic_add_fetch_32(&pVnode->refCount, 1); - vDebug("vgId:%d, get vnode, refCount:%d", pVnode->vgId, pVnode->refCount); + vTrace("vgId:%d, get vnode, refCount:%d", pVnode->vgId, pVnode->refCount); return pVnode; } @@ -456,7 +456,7 @@ static void vnodeCleanUp(SVnodeObj *pVnode) { pVnode->sync = NULL; } - vDebug("vgId:%d, vnode will be cleanuped, refCount:%d", pVnode->vgId, pVnode->refCount); + vTrace("vgId:%d, vnode will cleanup, refCount:%d", pVnode->vgId, pVnode->refCount); // release local resources only after cutting off outside connections vnodeRelease(pVnode); diff --git a/tests/script/sh/deploy.sh b/tests/script/sh/deploy.sh index 5837cf5a1a..a95949bc36 100755 --- a/tests/script/sh/deploy.sh +++ b/tests/script/sh/deploy.sh @@ -110,18 +110,23 @@ echo "second ${HOSTNAME}:7200" >> $TAOS_CFG echo "serverPort ${NODE}" >> $TAOS_CFG echo "dataDir $DATA_DIR" >> $TAOS_CFG echo "logDir $LOG_DIR" >> $TAOS_CFG -echo "dDebugFlag 135" >> $TAOS_CFG echo "mDebugFlag 135" >> $TAOS_CFG echo "sdbDebugFlag 135" >> $TAOS_CFG -echo "rpcDebugFlag 135" >> $TAOS_CFG -echo "tmrDebugFlag 131" >> $TAOS_CFG +echo "dDebugFlag 135" >> $TAOS_CFG +echo "vDebugFlag 151" >> $TAOS_CFG echo "cDebugFlag 135" >> $TAOS_CFG +echo "jnidebugFlag 135" >> $TAOS_CFG +echo "odbcdebugFlag 135" >> $TAOS_CFG echo "httpDebugFlag 135" >> $TAOS_CFG echo "monitorDebugFlag 131" >> $TAOS_CFG +echo "mqttDebugFlag 131" >> $TAOS_CFG +echo "qdebugFlag 135" >> $TAOS_CFG +echo "rpcDebugFlag 135" >> $TAOS_CFG +echo "tmrDebugFlag 131" >> $TAOS_CFG +echo "cDebugFlag 135" >> $TAOS_CFG echo "udebugFlag 135" >> $TAOS_CFG -echo "jnidebugFlag 135" >> $TAOS_CFG echo "sdebugFlag 135" >> $TAOS_CFG -echo "qdebugFlag 135" >> $TAOS_CFG +echo "wdebugFlag 135" >> $TAOS_CFG echo "monitor 0" >> $TAOS_CFG echo "monitorInterval 1" >> $TAOS_CFG echo "http 0" >> $TAOS_CFG -- GitLab