wgengine/wglog: add TS_DEBUG_RAW_WGLOG envknob for raw wg logs

Updates #7617 (part of debugging it)

Change-Id: I1bcbdcf0f929e3bcf83f244b1033fd438aa6dac1
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/11234/head
Brad Fitzpatrick 9 months ago committed by Brad Fitzpatrick
parent 8b9474b06a
commit 6ad6d6b252

@ -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"
@ -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),

Loading…
Cancel
Save