netcheck: aggregate spammy logging onto one concise line

This commit is contained in:
Brad Fitzpatrick
2020-04-09 13:13:05 -07:00
parent 922d9546bf
commit 73249f8032
3 changed files with 88 additions and 4 deletions
+2 -1
View File
@@ -14,6 +14,7 @@ import (
"tailscale.com/derp/derpmap"
"tailscale.com/net/dnscache"
"tailscale.com/netcheck"
"tailscale.com/types/logger"
)
var netcheckCmd = &ffcli.Command{
@@ -26,7 +27,7 @@ var netcheckCmd = &ffcli.Command{
func runNetcheck(ctx context.Context, args []string) error {
c := &netcheck.Client{
DERP: derpmap.Prod(),
Logf: log.Printf,
Logf: logger.WithPrefix(log.Printf, "netcheck: "),
DNSCache: dnscache.Get(),
}