enh: alter taosCheckAndSetDebugFlag log level

This commit is contained in:
Shungang Li 2024-10-30 10:26:49 +08:00
parent 3100492e93
commit 7d89545d3c
1 changed files with 7 additions and 2 deletions

View File

@ -2346,8 +2346,13 @@ static void taosCheckAndSetDebugFlag(int32_t *pFlagPtr, char *name, int32_t flag
if (noNeedToSetVars != NULL && taosArraySearch(noNeedToSetVars, name, taosLogVarComp, TD_EQ) != NULL) { if (noNeedToSetVars != NULL && taosArraySearch(noNeedToSetVars, name, taosLogVarComp, TD_EQ) != NULL) {
return; return;
} }
if (taosSetDebugFlag(pFlagPtr, name, flag) != 0) { int32_t code = 0;
uError("failed to set flag %s to %d", name, flag); if ((code = taosSetDebugFlag(pFlagPtr, name, flag)) != 0) {
if (code != TSDB_CODE_CFG_NOT_FOUND) {
uError("failed to set flag %s to %d", name, flag);
} else {
uDebug("failed to set flag %s to %d", name, flag);
}
} }
return; return;
} }