Skip to content

Commit

Permalink
Show IP addresses in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
teor2345 committed Nov 2, 2023
1 parent 6858fd4 commit 465d08b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions zebra-network/src/meta_addr/peer_addr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ impl fmt::Debug for PeerSocketAddr {

impl fmt::Display for PeerSocketAddr {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let ip_version = if self.is_ipv4() { "v4" } else { "v6" };
//let ip_version = if self.is_ipv4() { "v4" } else { "v6" };

// The port is usually not sensitive, and it's useful for debugging.
f.pad(&format!("{}redacted:{}", ip_version, self.port()))
//f.pad(&format!("{}redacted:{}", ip_version, self.port()))
f.pad(&format!("{}", self.remove_socket_addr_privacy()))
}
}

Expand Down

0 comments on commit 465d08b

Please sign in to comment.