logtail: gate "logtail started" behind TS_DEBUG_LOGTAIL envknob (#19891)

Gates the unnecessary "logtail started" message behind
the debug envknob TS_DEBUG_LOGTAIL. This is extra log spam that isn't
needed unless we are debugging.

Updates tailscale/corp#40908

Signed-off-by: James Scott <jim@tailscale.com>
This commit is contained in:
James Scott
2026-05-27 15:48:44 -07:00
committed by GitHub
parent 1a17ec1988
commit db60aa8eca
2 changed files with 6 additions and 1 deletions
+3 -1
View File
@@ -138,7 +138,9 @@ func NewLogger(cfg Config, logf tslogger.Logf) *Logger {
logger.uploadCancel = cancel
go logger.uploading(ctx)
logger.Write([]byte("logtail started"))
if envknob.Bool("TS_DEBUG_LOGTAIL") {
logger.Write([]byte("logtail started"))
}
return logger
}