Skip to content

Commit 98340dc

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 aa334d5 commit 98340dc

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
@@ -766,7 +766,7 @@ where
766766
},
767767
Ok(SendSuccess::BufferedAwaitingConnection(node_id)) => {
768768
log_trace!(
769-
self.logger, "Buffered onion message waiting on peer connection {}: {:?}",
769+
self.logger, "Buffered onion message waiting on peer connection {}: {}",
770770
log_suffix, node_id
771771
);
772772
},
@@ -957,7 +957,7 @@ where
957957
Ok(PeeledOnion::Forward(next_node_id, onion_message)) => {
958958
let mut message_recipients = self.message_recipients.lock().unwrap();
959959
if outbound_buffer_full(&next_node_id, &message_recipients) {
960-
log_trace!(self.logger, "Dropping forwarded onion message to peer {:?}: outbound buffer full", next_node_id);
960+
log_trace!(self.logger, "Dropping forwarded onion message to peer {}: outbound buffer full", next_node_id);
961961
return
962962
}
963963

@@ -974,7 +974,7 @@ where
974974
log_trace!(self.logger, "Forwarding an onion message to peer {}", next_node_id);
975975
},
976976
_ => {
977-
log_trace!(self.logger, "Dropping forwarded onion message to disconnected peer {:?}", next_node_id);
977+
log_trace!(self.logger, "Dropping forwarded onion message to disconnected peer {}", next_node_id);
978978
return
979979
},
980980
}

0 commit comments

Comments
 (0)