Merge pull request #28544 from taosdata/enh/TD-32501-main

enh: alter taosCheckAndSetDebugFlag log level
This commit is contained in:
Shengliang Guan 2024-10-31 13:32:14 +08:00 committed by GitHub
commit c111ec0613
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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) {
return;
}
if (taosSetDebugFlag(pFlagPtr, name, flag) != 0) {
uError("failed to set flag %s to %d", name, flag);
int32_t code = 0;
if ((code = taosSetDebugFlag(pFlagPtr, name, flag)) != 0) {
if (code != TSDB_CODE_CFG_NOT_FOUND) {
uError("failed to set flag %s to %d, since:%s", name, flag, tstrerror(code));
} else {
uDebug("failed to set flag %s to %d, since:%s", name, flag, tstrerror(code));
}
}
return;
}