From: Matt Joiner Date: Sat, 14 Apr 2018 01:24:06 +0000 (+1000) Subject: Include connection network in log message X-Git-Tag: v1.0.0~145 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=5c81c6c70ab9e0ad7565c970635ec9330ad482c5;p=btrtrc.git Include connection network in log message --- diff --git a/client.go b/client.go index eec8ad63..7ea276d8 100644 --- a/client.go +++ b/client.go @@ -394,7 +394,7 @@ func (cl *Client) acceptConnections(l net.Listener) { // routine just fucked off. return } - log.Fmsg("accepted connection from %s", conn.RemoteAddr()).AddValue(debugLogValue).Log(cl.logger) + log.Fmsg("accepted %s connection from %s", conn.RemoteAddr().Network(), conn.RemoteAddr()).AddValue(debugLogValue).Log(cl.logger) go torrent.Add(fmt.Sprintf("accepted conn remote IP len=%d", len(missinggo.AddrIP(conn.RemoteAddr()))), 1) go torrent.Add(fmt.Sprintf("accepted conn network=%s", conn.RemoteAddr().Network()), 1) go torrent.Add(fmt.Sprintf("accepted on %s listener", l.Addr().Network()), 1)