Ver código fonte

Z991239-4157 #comment 删除多余日志

80274480 2 anos atrás
pai
commit
c859f59833

+ 1 - 5
Module/mod_assistantchannel/mod_assistantchannel.cpp

@@ -322,9 +322,8 @@ ErrorCodeEnum CBizChannelEntity::Send(int type, bool compress, bool encrypt, int
 {
 	if (m_eState == eChannelState_Connected) {
 		//LOG_TRACE("tx pkt, %d bytes, type = %d, compress = %d, encrypt = %d, sub_type = %d, id = %d, hash=%d", data.m_iLength, type, !!compress, !!encrypt, sub_type, id, hash32_buf(data.m_pData, data.m_iLength, 0));
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("tx pkt, %d bytes, type = %d, compress = %d, encrypt = %d, sub_type = %d, id = %d, hash=%d", data.m_iLength, type, !!compress, !!encrypt, sub_type, id, hash32_buf(data.m_pData, data.m_iLength, 0));
+		//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("tx pkt, %d bytes, type = %d, compress = %d, encrypt = %d, sub_type = %d, id = %d, hash=%d", data.m_iLength, type, !!compress, !!encrypt, sub_type, id, hash32_buf(data.m_pData, data.m_iLength, 0));
 		int rc = bizchan_post_pkt(m_pChan, type, compress, encrypt, sub_type, id, (const char*)data.m_pData, data.m_iLength);
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("bizchan_post_pkt result is %d.", rc);
 		return rc == 0 ? Error_Succeed : Error_NetBroken;
 	}
 	else 
@@ -441,7 +440,6 @@ void CBizChannelEntity::on_connect(int error, const char *remote_ip, int remote_
 		}
 	}
 	else {
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%s:%d.", __FUNCTION__, __LINE__);
 		if (m_pChan) {
 			bizchan_close(m_pChan);
 			bizchan_destroy(m_pChan);
@@ -453,7 +451,6 @@ void CBizChannelEntity::on_connect(int error, const char *remote_ip, int remote_
 
 void CBizChannelEntity::on_close()
 {
-	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%s:%d.", __FUNCTION__, __LINE__);
 	if (m_pChan) {
 		bizchan_close(m_pChan);
 		bizchan_destroy(m_pChan);
@@ -498,7 +495,6 @@ void CBizChannelEntity::_on_connect(int error, const char *remote_ip, int remote
 
 void CBizChannelEntity::_on_close()
 {
-	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%s:%d.", __FUNCTION__, __LINE__);
 	NotifyOnClose *task = new NotifyOnClose();
 	task->m_pEntity = this;
 	GetFunction()->PostEntityTaskFIFO(task);

+ 5 - 5
Other/libbizchan/bizchan.cpp

@@ -479,7 +479,7 @@ static int on_recv(bizchan_t *chan, SOCKET conn)
 			while (ri->offset-i >= sizeof(acm_hdr)) {
 				acm_hdr *hdr = (acm_hdr*)&ri->buf[i];
 				//Dbg(chan, "on_recv, i:%d offset:%d, recv_length:%d", i,  ri->offset, n);
-				bizlog(chan, "on_recv, encrypt:%u, type:%u, sub_type:%u, length:%lu, compress:%u", hdr->encrypt, hdr->type, hdr->sub_type, hdr->length, hdr->compress);
+				//bizlog(chan, "on_recv, encrypt:%u, type:%u, sub_type:%u, length:%lu, compress:%u", hdr->encrypt, hdr->type, hdr->sub_type, hdr->length, hdr->compress);
 				if (hdr->length == 0) {
 					printf("broken");
 				}
@@ -566,7 +566,7 @@ static int on_recv(bizchan_t *chan, SOCKET conn)
 		result = (n < 0 || (errno == EWOULDBLOCK) || (errno == EINTR) || (errno == EAGAIN)) ? 0 : -1;
 	}
 
-	bizlog(chan, "on_recv n:%d, result:%d, errno:%d", n, result, errno);
+	//bizlog(chan, "on_recv n:%d, result:%d, errno:%d", n, result, errno);
 	return result;
 #endif
 }
@@ -606,10 +606,10 @@ static int on_send(bizchan_t *chan, SOCKET conn)
 				t->need_encrypt = 0;
 			}
 			n = send(conn, t->buf+t->sended, t->left, 0);
-			bizlog(chan, "on_send n:%d, t->sended:%d, t->left:%d", n, t->sended, t->left);
+			//bizlog(chan, "on_send n:%d, t->sended:%d, t->left:%d", n, t->sended, t->left);
 			if (n > 0) {
-				char tmp[32];
-				sprintf(tmp, "send out %d bytes!\n", n);
+				//char tmp[32];
+				//sprintf(tmp, "send out %d bytes!\n", n);
 				//OutputDebugStringA(tmp);
 				t->left -= n;
 				t->sended += n;