Quiet two little log annoyances.

reviewable/pr186/r1
Brad Fitzpatrick 2020-03-13 09:42:09 -07:00
parent db2436c7ff
commit 42e98d4edc
2 changed files with 6 additions and 2 deletions

View File

@ -215,8 +215,12 @@ func (b *LocalBackend) Start(opts Options) error {
b.mu.Lock() b.mu.Lock()
if b.netMapCache != nil { if b.netMapCache != nil {
diff := newSt.NetMap.ConciseDiffFrom(b.netMapCache) diff := newSt.NetMap.ConciseDiffFrom(b.netMapCache)
if strings.TrimSpace(diff) == "" {
b.logf("netmap diff: (none)")
} else {
b.logf("netmap diff:\n%v\n", diff) b.logf("netmap diff:\n%v\n", diff)
} }
}
b.netMapCache = newSt.NetMap b.netMapCache = newSt.NetMap
b.mu.Unlock() b.mu.Unlock()

View File

@ -233,7 +233,7 @@ func (c *Client) GetReport(ctx context.Context) (*Report, error) {
return gotEP4 != "" return gotEP4 != ""
} }
add := func(server, ipPort string, d time.Duration) { add := func(server, ipPort string, d time.Duration) {
c.logf("%s says we are %s (in %v)", server, ipPort, d) c.logf("%s says we are %s (in %v)", server, ipPort, d.Round(time.Millisecond))
ua, err := net.ResolveUDPAddr("udp", ipPort) ua, err := net.ResolveUDPAddr("udp", ipPort)
if err != nil { if err != nil {