summaryrefslogtreecommitdiffhomepage
path: root/wgengine/router/router.go
diff options
context:
space:
mode:
authorAndrew Dunham <andrew@du.nham.ca>2024-10-22 15:25:12 -0500
committerAndrew Dunham <andrew@du.nham.ca>2024-10-22 15:27:54 -0500
commit43dd4d1626f84c50a3d814b45d97829ca5727e64 (patch)
tree091599cdb6ded7332174e3dbb4693b1a8d8a800a /wgengine/router/router.go
parentb2665d9b89ee8c7be10a8e0a2fa36d35d21d8440 (diff)
downloadtailscale-andrew/wgengine-router-debug.tar.xz
tailscale-andrew/wgengine-router-debug.zip
wgengine/router: add debug logging component logsandrew/wgengine-router-debug
This uses the "component logging" feature to allow turning on additional debug logs for the Router at runtime. Currently, it's only implemented on Linux and with the CallbackRouter at this time. Updates #13887 Signed-off-by: Andrew Dunham <andrew@du.nham.ca> Change-Id: I251a7705765f950d118850f1e14f465729ba45c5
Diffstat (limited to 'wgengine/router/router.go')
-rw-r--r--wgengine/router/router.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/wgengine/router/router.go b/wgengine/router/router.go
index 423008978..03a6f0475 100644
--- a/wgengine/router/router.go
+++ b/wgengine/router/router.go
@@ -36,6 +36,10 @@ type Router interface {
// network should be either "udp4" or "udp6".
UpdateMagicsockPort(port uint16, network string) error
+ // SetDebugLoggingEnabled enables or disables debug logging in the
+ // router implementation.
+ SetDebugLoggingEnabled(enabled bool)
+
// Close closes the router.
Close() error
}