add logger_debug for saving net data

This commit is contained in:
zsx 2018-02-12 19:44:53 +08:00
parent 07816a2de4
commit 95f27fb2c3
2 changed files with 3 additions and 2 deletions

View File

@ -20,7 +20,7 @@ bool tcp_service::thread_on_read(acl::socket_stream* conn)
logger("read over from %s", conn->get_peer());
return false;
}
logger("read from %s, %d bytes, buf=|%s|",
logger_debug(DBG_NET, 1, "read from %s, %d bytes, buf=|%s|",
conn->get_peer(), (int) buf.size(), buf.c_str());
const char* peer_ip = conn->get_peer();

View File

@ -20,7 +20,8 @@ void udp_service::on_read(acl::socket_stream* stream)
return;
buf[n] = 0;
logger("read from %s, %d bytes, buf=|%s|", stream->get_peer(), n, buf);
logger_debug(DBG_NET, 1, "read from %s, %d bytes, buf=|%s|",
stream->get_peer(), n, buf);
const char* peer_ip = stream->get_peer();
if (peer_ip == NULL || *peer_ip == 0) {