Skip to content

Commit

Permalink
feat(rumqttc): Replace multi line debug log (#688)
Browse files Browse the repository at this point in the history
Change the ping timing debug log from a multi line string to a single
line with the use of the `Debug` impl of `Duration`. Multi line logs
screw a log stream in regards of readability.
  • Loading branch information
flxo authored Aug 23, 2023
1 parent 3c40444 commit fd24161
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions rumqttc/src/v5/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -587,11 +587,8 @@ impl MqttState {
self.await_pingresp = true;

debug!(
"Pingreq,
last incoming packet before {} millisecs,
last outgoing request before {} millisecs",
elapsed_in.as_millis(),
elapsed_out.as_millis()
"Pingreq, last incoming packet before {:?}, last outgoing request before {:?}",
elapsed_in, elapsed_out,
);

Packet::PingReq(PingReq).write(&mut self.write)?;
Expand Down

0 comments on commit fd24161

Please sign in to comment.