add trace log

This commit is contained in:
yihaoDeng 2024-08-19 17:39:53 +08:00
parent feb23ba56b
commit bef98f4787
1 changed files with 20 additions and 19 deletions

View File

@ -197,14 +197,14 @@ static FORCE_INLINE int32_t taosBuildDstAddr(const char* server, uint16_t port,
uint32_t ip = 0;
int32_t code = taosGetIpv4FromFqdn(server, &ip);
if (code) {
tError("http-report failed to resolving domain names: %s", server);
tError("http-report failed to resolving domain names %s, reason: %s", server, tstrerror(code));
return TSDB_CODE_RPC_FQDN_ERROR;
}
char buf[256] = {0};
tinet_ntoa(buf, ip);
int ret = uv_ip4_addr(buf, port, dest);
if (ret != 0) {
tError("http-report failed to get addr %s", uv_err_name(ret));
tError("http-report failed to get addr, reason:%s", uv_err_name(ret));
return TSDB_CODE_THIRDPARTY_ERROR;
}
return 0;
@ -267,7 +267,7 @@ static void httpDestroyMsg(SHttpMsg* msg) {
}
static void httpDestroyMsgWrapper(void* cont, void* param) {
SHttpMsg* pMsg = cont;
tWarn("http-report destroy msg, seq: %" PRId64 "", pMsg->seq);
tWarn("http-report destroy msg, chanId:%" PRId64 ", seq:%" PRId64 "", pMsg->chanId, pMsg->seq);
httpDestroyMsg(pMsg);
}
@ -617,8 +617,9 @@ static void httpHandleReq(SHttpMsg* msg) {
int ret = uv_tcp_open((uv_tcp_t*)&cli->tcp, fd);
if (ret != 0) {
tError("http-report failed to open socket, reason:%s, dst:%s:%d, chanId:%" PRId64 ", seq:%" PRId64 ", reason:%s",
uv_strerror(ret), cli->addr, cli->port, chanId, cli->seq, uv_strerror(ret));
tError("http-report failed to open socket, dst:%s:%d, chanId:%" PRId64 ", seq:%" PRId64 ", reason:%s", cli->addr,
cli->port, chanId, cli->seq, uv_strerror(ret));
destroyHttpClient(cli);
(void)taosReleaseRef(httpRefMgt, chanId);
return;