From ba34e7409ca0ac2c3bc39de71565ca66e2e52849 Mon Sep 17 00:00:00 2001 From: Eugene Kim Date: Sun, 16 Jun 2019 00:14:21 -0700 Subject: [PATCH] Log network local peer ID and listen addresses ... and not the entire net struct. --- internal/utils/connlogger.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/utils/connlogger.go b/internal/utils/connlogger.go index 7baf02baf..0b02d10ed 100644 --- a/internal/utils/connlogger.go +++ b/internal/utils/connlogger.go @@ -17,7 +17,9 @@ type ConnLogger struct { } func netLogger(n net.Network, l log.Logger) log.Logger { - return l.New("net", n) + return l.New("net", + "netLocalPeer", n.LocalPeer(), + "netListenAddresses", n.ListenAddresses()) } func connLogger(c net.Conn, l log.Logger) log.Logger {