mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 21:27:31 +00:00
util/syspolicy, ipn: add "tailscale debug component-logs" support
Fixes #13313 Fixes #12687 Signed-off-by: Nick Khyl <nickk@tailscale.com>
This commit is contained in:
@@ -238,6 +238,7 @@ type StateKey string
|
||||
var DebuggableComponents = []string{
|
||||
"magicsock",
|
||||
"sockstats",
|
||||
"syspolicy",
|
||||
}
|
||||
|
||||
type Options struct {
|
||||
|
@@ -583,6 +583,8 @@ func (b *LocalBackend) SetComponentDebugLogging(component string, until time.Tim
|
||||
}
|
||||
}
|
||||
}
|
||||
case "syspolicy":
|
||||
setEnabled = syspolicy.SetDebugLoggingEnabled
|
||||
}
|
||||
if setEnabled == nil || !slices.Contains(ipn.DebuggableComponents, component) {
|
||||
return fmt.Errorf("unknown component %q", component)
|
||||
|
Reference in New Issue
Block a user