mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-12-02 20:08:21 +08:00
add logger_debug for saving net data
This commit is contained in:
parent
07816a2de4
commit
95f27fb2c3
@ -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();
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user