feat(lib): switch from log to tracing (#475)

This commit is contained in:
David Barsky
2020-07-07 18:55:24 -04:00
committed by GitHub
parent d6fa8386c4
commit d3b9f1e36a
29 changed files with 179 additions and 176 deletions

View File

@@ -107,7 +107,7 @@ impl PingPong {
&Ping::SHUTDOWN,
"pending_ping should be for shutdown",
);
log::trace!("recv PING SHUTDOWN ack");
tracing::trace!("recv PING SHUTDOWN ack");
return ReceivedPing::Shutdown;
}
@@ -117,7 +117,7 @@ impl PingPong {
if let Some(ref users) = self.user_pings {
if ping.payload() == &Ping::USER && users.receive_pong() {
log::trace!("recv PING USER ack");
tracing::trace!("recv PING USER ack");
return ReceivedPing::Unknown;
}
}
@@ -125,7 +125,7 @@ impl PingPong {
// else we were acked a ping we didn't send?
// The spec doesn't require us to do anything about this,
// so for resiliency, just ignore it for now.
log::warn!("recv PING ack that we never sent: {:?}", ping);
tracing::warn!("recv PING ack that we never sent: {:?}", ping);
ReceivedPing::Unknown
} else {
// Save the ping's payload to be sent as an acknowledgement.