diff --git a/selection.go b/selection.go index e6e1fac..55ad20b 100644 --- a/selection.go +++ b/selection.go @@ -59,7 +59,7 @@ func (s *controllingSelector) ContactCandidates() { default: p := s.agent.getBestValidCandidatePair() if p != nil && s.isNominatable(p.Local) && s.isNominatable(p.Remote) { - s.log.Tracef("Nominatable pair found, nominating (%s, %s)", p.Local.String(), p.Remote.String()) + s.log.Tracef("Nominatable pair found, nominating (%s, %s)", p.Local, p.Remote) p.nominated = true s.nominatedPair = p s.nominatePair(p) @@ -87,7 +87,7 @@ func (s *controllingSelector) nominatePair(pair *CandidatePair) { return } - s.log.Tracef("Ping STUN (nominate candidate pair) from %s to %s", pair.Local.String(), pair.Remote.String()) + s.log.Tracef("Ping STUN (nominate candidate pair) from %s to %s", pair.Local, pair.Remote) s.agent.sendBindingRequest(msg, pair.Local, pair.Remote) } @@ -106,8 +106,7 @@ func (s *controllingSelector) HandleBindingRequest(m *stun.Message, local, remot if bestPair == nil { s.log.Tracef("No best pair available") } else if bestPair.equal(p) && s.isNominatable(p.Local) && s.isNominatable(p.Remote) { - s.log.Tracef("The candidate (%s, %s) is the best candidate available, marking it as nominated", - p.Local.String(), p.Remote.String()) + s.log.Tracef("The candidate (%s, %s) is the best candidate available, marking it as nominated", p.Local, p.Remote) s.nominatedPair = p s.nominatePair(p) } @@ -130,7 +129,7 @@ func (s *controllingSelector) HandleSuccessResponse(m *stun.Message, local, remo return } - s.log.Tracef("Inbound STUN (SuccessResponse) from %s to %s", remote.String(), local.String()) + s.log.Tracef("Inbound STUN (SuccessResponse) from %s to %s", remote, local) p := s.agent.findPair(local, remote) if p == nil { @@ -221,7 +220,7 @@ func (s *controlledSelector) HandleSuccessResponse(m *stun.Message, local, remot return } - s.log.Tracef("Inbound STUN (SuccessResponse) from %s to %s", remote.String(), local.String()) + s.log.Tracef("Inbound STUN (SuccessResponse) from %s to %s", remote, local) p := s.agent.findPair(local, remote) if p == nil { diff --git a/udp_mux.go b/udp_mux.go index f504259..46f81ca 100644 --- a/udp_mux.go +++ b/udp_mux.go @@ -343,7 +343,7 @@ func (m *UDPMuxDefault) connWorker() { } if destinationConn == nil { - m.params.Logger.Tracef("Dropping packet from %s, addr: %s", udpAddr.addr.String(), addr.String()) + m.params.Logger.Tracef("Dropping packet from %s, addr: %s", udpAddr.addr, addr) continue }