disable tailnet logging in dev mode
This commit is contained in:
parent
22b5492f43
commit
d6c59aef3a
5
main.go
5
main.go
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user