ipn/local: get rid of some straggling calls to the log module.

Use b.logf() instead.

Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
This commit is contained in:
Avery Pennarun 2020-05-21 15:51:22 -04:00
parent af9328c1b7
commit ea8f92b312

View File

@ -8,7 +8,6 @@
"context" "context"
"errors" "errors"
"fmt" "fmt"
"log"
"strings" "strings"
"sync" "sync"
"time" "time"
@ -326,7 +325,7 @@ func (b *LocalBackend) Start(opts Options) error {
} }
if newSt.Err != "" { if newSt.Err != "" {
// TODO(crawshaw): display in the UI. // TODO(crawshaw): display in the UI.
log.Print(newSt.Err) b.logf("Received error: %v", newSt.Err)
return return
} }
if newSt.NetMap != nil { if newSt.NetMap != nil {
@ -348,7 +347,8 @@ func (b *LocalBackend) Start(opts Options) error {
return return
} }
if s == nil { if s == nil {
log.Fatalf("weird: non-error wgengine update with status=nil") b.logf("weird: non-error wgengine update with status=nil: %v", s)
return
} }
es := b.parseWgStatus(s) es := b.parseWgStatus(s)
@ -744,7 +744,8 @@ func (b *LocalBackend) authReconfig() {
} }
cfg, err := nm.WGCfg(uflags, dns) cfg, err := nm.WGCfg(uflags, dns)
if err != nil { if err != nil {
log.Fatalf("WGCfg: %v", err) b.logf("wgcfg: %v", err)
return
} }
err = b.e.Reconfig(cfg, routerConfig(cfg, uc, dom)) err = b.e.Reconfig(cfg, routerConfig(cfg, uc, dom))