fix:[TD-31696]print error log to screen if init error
This commit is contained in:
parent
21f4926cb8
commit
efb010ab9b
|
@ -1111,10 +1111,10 @@ int32_t cfgLoadFromCfgFile(SConfig *pConfig, const char *filepath) {
|
||||||
}
|
}
|
||||||
|
|
||||||
code = cfgSetItem(pConfig, name, newValue, CFG_STYPE_CFG_FILE, true);
|
code = cfgSetItem(pConfig, name, newValue, CFG_STYPE_CFG_FILE, true);
|
||||||
if (code != 0){
|
if (TSDB_CODE_SUCCESS != code && TSDB_CODE_CFG_NOT_FOUND != code) {
|
||||||
(void)printf("cfg:%s, value:%s failed since %s\n", name,newValue, tstrerror(code));
|
(void)printf("cfg:%s, value:%s failed since %s\n", name,newValue, tstrerror(code));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (TSDB_CODE_SUCCESS != code && TSDB_CODE_CFG_NOT_FOUND != code) break;
|
|
||||||
} else {
|
} else {
|
||||||
(void)paGetToken(value + vlen + 1, &value2, &vlen2);
|
(void)paGetToken(value + vlen + 1, &value2, &vlen2);
|
||||||
if (vlen2 != 0) {
|
if (vlen2 != 0) {
|
||||||
|
@ -1128,10 +1128,10 @@ int32_t cfgLoadFromCfgFile(SConfig *pConfig, const char *filepath) {
|
||||||
}
|
}
|
||||||
|
|
||||||
code = cfgSetItem(pConfig, name, value, CFG_STYPE_CFG_FILE, true);
|
code = cfgSetItem(pConfig, name, value, CFG_STYPE_CFG_FILE, true);
|
||||||
if (code != 0){
|
if (TSDB_CODE_SUCCESS != code && TSDB_CODE_CFG_NOT_FOUND != code) {
|
||||||
(void)printf("cfg:%s, value:%s failed since %s\n", name, value, tstrerror(code));
|
(void)printf("cfg:%s, value:%s failed since %s\n", name, value, tstrerror(code));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (TSDB_CODE_SUCCESS != code && TSDB_CODE_CFG_NOT_FOUND != code) break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(name, "dataDir") == 0) {
|
if (strcasecmp(name, "dataDir") == 0) {
|
||||||
|
|
Loading…
Reference in New Issue