Skip to content

Commit c4ba373

Browse files
committed
Use {}, not {:?} for PublicKey logging
The `Debug` serialization of `PublicKey`s includes both the X and Y coordinate, which isn't something most of our users deal with. Instead, logging using `Display` gives users the keys they're used to.
1 parent 4a7ba67 commit c4ba373

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lightning/src/onion_message/messenger.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ where
753753
},
754754
Ok(SendSuccess::BufferedAwaitingConnection(node_id)) => {
755755
log_trace!(
756-
self.logger, "Buffered onion message waiting on peer connection {}: {:?}",
756+
self.logger, "Buffered onion message waiting on peer connection {}: {}",
757757
log_suffix, node_id
758758
);
759759
},
@@ -944,7 +944,7 @@ where
944944
Ok(PeeledOnion::Forward(next_node_id, onion_message)) => {
945945
let mut message_recipients = self.message_recipients.lock().unwrap();
946946
if outbound_buffer_full(&next_node_id, &message_recipients) {
947-
log_trace!(self.logger, "Dropping forwarded onion message to peer {:?}: outbound buffer full", next_node_id);
947+
log_trace!(self.logger, "Dropping forwarded onion message to peer {}: outbound buffer full", next_node_id);
948948
return
949949
}
950950

@@ -961,7 +961,7 @@ where
961961
log_trace!(self.logger, "Forwarding an onion message to peer {}", next_node_id);
962962
},
963963
_ => {
964-
log_trace!(self.logger, "Dropping forwarded onion message to disconnected peer {:?}", next_node_id);
964+
log_trace!(self.logger, "Dropping forwarded onion message to disconnected peer {}", next_node_id);
965965
return
966966
},
967967
}

0 commit comments

Comments
 (0)