From 8646a8c59acea42f99f69d1e42b2dd5959b1aacf Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Thu, 7 Mar 2024 21:47:57 +0000 Subject: [PATCH] f more context --- lightning/src/onion_message/messenger.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lightning/src/onion_message/messenger.rs b/lightning/src/onion_message/messenger.rs index 7d4dca3753c..a639d192554 100644 --- a/lightning/src/onion_message/messenger.rs +++ b/lightning/src/onion_message/messenger.rs @@ -735,6 +735,8 @@ where &self, contents: T, destination: Destination, reply_path: Option, log_suffix: fmt::Arguments ) -> Result { + let intro_node_logger = + WithContext::from(&self.logger, Some(destination.first_node()), None); let result = self.find_path(destination) .and_then(|path| self.enqueue_onion_message(path, contents, reply_path, log_suffix)); @@ -749,11 +751,11 @@ where log_trace!(self.logger, "Failed sending onion message {}: {:?}", log_suffix, e); }, Ok(SendSuccess::Buffered) => { - log_trace!(self.logger, "Buffered onion message {}", log_suffix); + log_trace!(intro_node_logger, "Buffered onion message {}", log_suffix); }, Ok(SendSuccess::BufferedAwaitingConnection(node_id)) => { log_trace!( - WithContext::from(&self.logger, Some(*node_id), None), + intro_node_logger, "Buffered onion message waiting on peer connection {}: {}", log_suffix, node_id );