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:
+3
-1
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user