Skip to content

Commit

Permalink
wgengine/wglog: add TS_DEBUG_RAW_WGLOG envknob for raw wg logs
Browse files Browse the repository at this point in the history
Updates tailscale#7617 (part of debugging it)

Change-Id: I1bcbdcf0f929e3bcf83f244b1033fd438aa6dac1
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
  • Loading branch information
bradfitz committed Feb 24, 2024
1 parent 8b9474b commit 6ad6d6b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions wgengine/wglog/wglog.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"sync"

"github.com/tailscale/wireguard-go/device"
"tailscale.com/envknob"
"tailscale.com/syncs"
"tailscale.com/types/key"
"tailscale.com/types/logger"
Expand Down Expand Up @@ -87,6 +88,9 @@ func NewLogger(logf logger.Logf) *Logger {
}
logf(format, newargs...)
}
if envknob.Bool("TS_DEBUG_RAW_WGLOG") {
wrapper = logf
}
ret.DeviceLogger = &device.Logger{
Verbosef: logger.WithPrefix(wrapper, prefix+"[v2] "),
Errorf: logger.WithPrefix(wrapper, prefix),
Expand Down

0 comments on commit 6ad6d6b

Please sign in to comment.