Log network local peer ID and listen addresses

... and not the entire net struct.
pull/1074/head
Eugene Kim 6 years ago
parent 3858c7577f
commit ba34e7409c
  1. 4
      internal/utils/connlogger.go

@ -17,7 +17,9 @@ type ConnLogger struct {
} }
func netLogger(n net.Network, l log.Logger) log.Logger { 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 { func connLogger(c net.Conn, l log.Logger) log.Logger {

Loading…
Cancel
Save