fix(agent/agentcontainers): stop logging empty lines (#18605)

This PR makes the devcontainer logs have fewer whitespace lines.
This commit is contained in:
Danielle Maywood
2025-06-26 15:58:10 +00:00
committed by GitHub
parent 5ae320e79e
commit 98c77fece5
4 changed files with 8 additions and 16 deletions
+1 -1
View File
@@ -458,7 +458,7 @@ func (l *devcontainerCLILogWriter) Write(p []byte) (n int, err error) {
}
if logLine.Level >= 3 {
l.logger.Info(l.ctx, "@devcontainer/cli", slog.F("line", string(line)))
_, _ = l.writer.Write([]byte(logLine.Text + "\n"))
_, _ = l.writer.Write([]byte(strings.TrimSpace(logLine.Text) + "\n"))
continue
}
// If we've successfully parsed the final log line, it will successfully parse