types/logger: add WithPrefix, use it in two places

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2020-02-25 11:35:46 -08:00
parent 758744a4e3
commit 3988ddc85d
3 changed files with 12 additions and 9 deletions

View File

@ -174,9 +174,7 @@ func (b *LocalBackend) Start(opts Options) error {
persist = &controlclient.Persist{}
}
cli, err := controlclient.New(controlclient.Options{
Logf: func(fmt string, args ...interface{}) {
b.logf("control: "+fmt, args...)
},
Logf: logger.WithPrefix(b.logf, "control: "),
Persist: *persist,
ServerURL: b.serverURL,
Hostinfo: hi,