fix:add log for taosCreateLog error
This commit is contained in:
parent
6323a6e801
commit
4fdef7421c
|
@ -543,7 +543,7 @@ void taos_init_imp(void) {
|
|||
|
||||
if (taosCreateLog("taoslog", 10, configDir, NULL, NULL, NULL, NULL, 1) != 0) {
|
||||
// ignore create log failed, only print
|
||||
printf(" WARING: Create taoslog failed. configDir=%s\n", configDir);
|
||||
printf(" WARING: Create taoslog failed:%s. configDir=%s\n", strerror(errno), configDir);
|
||||
}
|
||||
|
||||
if (taosInitCfg(configDir, NULL, NULL, NULL, NULL, 1) != 0) {
|
||||
|
|
|
@ -1238,13 +1238,13 @@ int32_t taosCreateLog(const char *logname, int32_t logFileNum, const char *cfgDi
|
|||
}
|
||||
|
||||
if (taosLoadCfg(pCfg, envCmd, cfgDir, envFile, apolloUrl) != 0) {
|
||||
uError("failed to load cfg since %s", terrstr());
|
||||
printf("failed to load cfg since %s", terrstr());
|
||||
cfgCleanup(pCfg);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (cfgLoadFromArray(pCfg, pArgs) != 0) {
|
||||
uError("failed to load cfg from array since %s", terrstr());
|
||||
printf("failed to load cfg from array since %s", terrstr());
|
||||
cfgCleanup(pCfg);
|
||||
return -1;
|
||||
}
|
||||
|
@ -1260,13 +1260,13 @@ int32_t taosCreateLog(const char *logname, int32_t logFileNum, const char *cfgDi
|
|||
|
||||
if (taosMulModeMkDir(tsLogDir, 0777) != 0) {
|
||||
terrno = TAOS_SYSTEM_ERROR(errno);
|
||||
uError("failed to create dir:%s since %s", tsLogDir, terrstr());
|
||||
printf("failed to create dir:%s since %s", tsLogDir, terrstr());
|
||||
cfgCleanup(pCfg);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (taosInitLog(logname, logFileNum) != 0) {
|
||||
uError("failed to init log file since %s", terrstr());
|
||||
printf("failed to init log file since %s", terrstr());
|
||||
cfgCleanup(pCfg);
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -676,9 +676,9 @@ static int32_t extractDataForMq(STQ* pTq, STqHandle* pHandle, const SMqPollReq*
|
|||
if (metaRsp.metaRspLen > 0) {
|
||||
code = tqSendMetaPollRsp(pTq, pMsg, pRequest, &metaRsp);
|
||||
tqDebug("tmq poll: consumer:0x%" PRIx64 " subkey:%s vgId:%d, send meta offset type:%d,uid:%" PRId64
|
||||
",version:%" PRId64,
|
||||
",ts:%" PRId64,
|
||||
consumerId, pHandle->subKey, vgId, metaRsp.rspOffset.type, metaRsp.rspOffset.uid,
|
||||
metaRsp.rspOffset.version);
|
||||
metaRsp.rspOffset.ts);
|
||||
taosMemoryFree(metaRsp.metaRsp);
|
||||
tDeleteSTaosxRsp(&taosxRsp);
|
||||
return code;
|
||||
|
|
Loading…
Reference in New Issue