From 98340dc25371eeae2854bebf6ac0f4faba0d2830 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 6 Feb 2024 23:13:08 +0000 Subject: [PATCH] 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. --- lightning/src/onion_message/messenger.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lightning/src/onion_message/messenger.rs b/lightning/src/onion_message/messenger.rs index 37de55045..c6b925704 100644 --- a/lightning/src/onion_message/messenger.rs +++ b/lightning/src/onion_message/messenger.rs @@ -766,7 +766,7 @@ where }, Ok(SendSuccess::BufferedAwaitingConnection(node_id)) => { log_trace!( - self.logger, "Buffered onion message waiting on peer connection {}: {:?}", + self.logger, "Buffered onion message waiting on peer connection {}: {}", log_suffix, node_id ); }, @@ -957,7 +957,7 @@ where Ok(PeeledOnion::Forward(next_node_id, onion_message)) => { let mut message_recipients = self.message_recipients.lock().unwrap(); if outbound_buffer_full(&next_node_id, &message_recipients) { - log_trace!(self.logger, "Dropping forwarded onion message to peer {:?}: outbound buffer full", next_node_id); + log_trace!(self.logger, "Dropping forwarded onion message to peer {}: outbound buffer full", next_node_id); return } @@ -974,7 +974,7 @@ where log_trace!(self.logger, "Forwarding an onion message to peer {}", next_node_id); }, _ => { - log_trace!(self.logger, "Dropping forwarded onion message to disconnected peer {:?}", next_node_id); + log_trace!(self.logger, "Dropping forwarded onion message to disconnected peer {}", next_node_id); return }, } -- 2.39.5