You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add peer_id and channel_id explicitly to log records
Adds Context logging alongside Default logging as
an alternative to enable compiler recommendations for
adding extra context (peer_id and channel_id) to
log records
log_trace!(logger,"Considering {} channels for invoice route hints", channels.len());
627
+
log_trace!(logger,None,None,"Considering {} channels for invoice route hints", channels.len());
628
628
for channel in channels.into_iter().filter(|chan| chan.is_channel_ready){
629
629
if channel.get_inbound_payment_scid().is_none() || channel.counterparty.forwarding_info.is_none(){
630
-
log_trace!(logger,"Ignoring channel {} for invoice route hints", log_bytes!(channel.channel_id));
630
+
log_trace!(logger,Some(channel.counterparty.node_id),Some(channel.channel_id),"Ignoring channel {} for invoice route hints", log_bytes!(channel.channel_id));
631
631
continue;
632
632
}
633
633
@@ -640,15 +640,15 @@ where
640
640
}else{
641
641
// If any public channel exists, return no hints and let the sender
642
642
// look at the public channels instead.
643
-
log_trace!(logger,"Not including channels in invoice route hints on account of public channel {}",
643
+
log_trace!(logger,Some(channel.counterparty.node_id),Some(channel.channel_id),"Not including channels in invoice route hints on account of public channel {}",
Copy file name to clipboardExpand all lines: lightning-rapid-gossip-sync/src/processing.rs
+2-1
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,8 @@ use lightning::ln::msgs::{
10
10
};
11
11
use lightning::routing::gossip::NetworkGraph;
12
12
use lightning::util::logger::Logger;
13
-
use lightning::{log_debug, log_warn, log_trace, log_given_level, log_gossip};
13
+
14
+
use lightning::{_log_debug as log_debug, _log_trace as log_trace, _log_warn as log_warn, _log_gossip as log_gossip, _log_given_level as log_given_level};
0 commit comments