disable tailnet logging in dev mode

This commit is contained in:
Aaron Bieber 2023-06-07 11:57:42 -06:00
parent 22b5492f43
commit d6c59aef3a
No known key found for this signature in database

View File

@ -21,6 +21,7 @@ import (
"suah.dev/gostart/data"
"tailscale.com/client/tailscale"
"tailscale.com/tsnet"
"tailscale.com/types/logger"
)
//go:embed schema.sql
@ -71,6 +72,10 @@ func main() {
app.tsServer = &tsnet.Server{
Hostname: *name,
}
if *dev {
app.tsServer.Logf = logger.Discard
}
app.tsLocalClient, err = app.tsServer.LocalClient()
if err != nil {
log.Fatal("can't get ts local client: ", err)