tsnet: skip logger setup when logtail is omitted

Avoid creating or reading tailscaled.log.conf with ts_omit_logtail.

Fixes #22244

Change-Id: If1ac073501aa6a42e4b7d9757980d2bb79fbabac
Signed-off-by: Fredrik Fornwall <fredrik@fornwall.net>
This commit is contained in:
Fredrik Fornwall authored and Brad Fitzpatrick committed 2026-11-08 13:49:02 -08:00
1 parent 3a72a686cb
commit 48f559c113
1 file changed
+1 -1
+1 -1
View File
@@ -1114,7 +1114,7 @@ func (s *Server) resolveAuthKey() (string, error) {
}
func (s *Server) startLogger(closePool *closeOnErrorPool, health *health.Tracker, tsLogf logger.Logf) error {
if testenv.InTest() {
if !buildfeatures.HasLogTail || testenv.InTest() {
return nil
}
cfgPath := filepath.Join(s.rootPath, "tailscaled.log.conf")