mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-05 23:07:44 +00:00
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>
This commit is contained in:
parent
8b9474b06a
commit
6ad6d6b252
@ -10,6 +10,7 @@
|
||||
"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…
x
Reference in New Issue
Block a user