提交 dabf6f95 编写于 作者: Y yihaoDeng

revert some code

上级 992842ff
...@@ -266,33 +266,6 @@ void taosSetAllDebugFlag() { ...@@ -266,33 +266,6 @@ void taosSetAllDebugFlag() {
uInfo("all debug flag are set to %d", debugFlag); uInfo("all debug flag are set to %d", debugFlag);
} }
} }
typedef struct {
char *name;
int32_t len;
void *flag;
} SDynCfgLog;
bool taosDynCfgDebugFlag(const char *str, int32_t slen, int32_t flag) {
const SDynCfgLog cfgLog[] = {
{"debugFlag", 9, NULL}, {"monDebugFlag", 12, &mDebugFlag}, {"vDebugFlag", 10, &vDebugFlag}, {"mDebugFlag", 10, &mDebugFlag},
{"cDebugFlag", 10, &cDebugFlag}, {"httpDebugFlag", 13, &httpDebugFlag}, {"qDebugflag", 10, &qDebugFlag}, {"sdbDebugFlag", 12, &sdbDebugFlag},
{"uDebugFlag", 10, &uDebugFlag}, {"tsdbDebugFlag", 13, &tsdbDebugFlag}, {"sDebugflag", 10, &sDebugFlag}, {"rpcDebugFlag", 12, &rpcDebugFlag},
{"dDebugFlag", 10, &dDebugFlag}, {"mqttDebugFlag", 13, &mqttDebugFlag}, {"wDebugFlag", 10, &wDebugFlag}, {"tmrDebugFlag", 12, &tmrDebugFlag},
{"cqDebugFlag", 11, &cqDebugFlag},
};
for (int i = 0; i < tListLen(cfgLog); i++) {
if (slen == cfgLog[i].len && strncasecmp(cfgLog[i].name, str, slen) == 0) {
if (cfgLog[i].flag == NULL) {
debugFlag = flag;
taosSetAllDebugFlag();
} else {
*((int32_t *)(cfgLog[i].flag)) = flag;
}
return true;
}
}
return false;
}
bool taosCfgDynamicOptions(char *msg) { bool taosCfgDynamicOptions(char *msg) {
char *option, *value; char *option, *value;
...@@ -343,8 +316,10 @@ bool taosCfgDynamicOptions(char *msg) { ...@@ -343,8 +316,10 @@ bool taosCfgDynamicOptions(char *msg) {
} }
return true; return true;
} }
if (strncasecmp(cfg->option, "debugFlag", olen) == 0) {
return taosDynCfgDebugFlag(cfg->option, olen, vint); taosSetAllDebugFlag();
}
return true;
} }
if (strncasecmp(option, "resetlog", 8) == 0) { if (strncasecmp(option, "resetlog", 8) == 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册