@@ -735,6 +735,8 @@ where
735735 & self , contents : T , destination : Destination , reply_path : Option < BlindedPath > ,
736736 log_suffix : fmt:: Arguments
737737 ) -> Result < SendSuccess , SendError > {
738+ let intro_node_logger =
739+ WithContext :: from ( & self . logger , Some ( destination. first_node ( ) ) , None ) ;
738740 let result = self . find_path ( destination)
739741 . and_then ( |path| self . enqueue_onion_message ( path, contents, reply_path, log_suffix) ) ;
740742
@@ -749,11 +751,11 @@ where
749751 log_trace ! ( self . logger, "Failed sending onion message {}: {:?}" , log_suffix, e) ;
750752 } ,
751753 Ok ( SendSuccess :: Buffered ) => {
752- log_trace ! ( self . logger , "Buffered onion message {}" , log_suffix) ;
754+ log_trace ! ( intro_node_logger , "Buffered onion message {}" , log_suffix) ;
753755 } ,
754756 Ok ( SendSuccess :: BufferedAwaitingConnection ( node_id) ) => {
755757 log_trace ! (
756- WithContext :: from ( & self . logger , Some ( * node_id ) , None ) ,
758+ intro_node_logger ,
757759 "Buffered onion message waiting on peer connection {}: {}" ,
758760 log_suffix, node_id
759761 ) ;
0 commit comments