Summary
tkn pipelinerun logs and tkn taskrun logs are likely the most-used commands by AI agents debugging CI/CD failures. The current output is optimized for human consumption with color codes and interleaved multi-container output that's hard to parse programmatically.
Proposal
--output json for structured log output with metadata (task name, step name, timestamp, message)
- Ensure
--follow works well in non-interactive/agent contexts
- Clear separation of log lines per step/container in structured mode
- Consider
--timestamps in a parseable format (RFC3339)
Example
tkn pipelinerun logs my-run --output json
{"task": "build", "step": "build-step", "timestamp": "2026-05-12T10:00:00Z", "message": "Building image..."}
{"task": "build", "step": "build-step", "timestamp": "2026-05-12T10:00:01Z", "message": "Successfully built abc123"}
NDJSON (one line per log entry) is the natural format here since logs are a stream.
/kind feature
Summary
tkn pipelinerun logsandtkn taskrun logsare likely the most-used commands by AI agents debugging CI/CD failures. The current output is optimized for human consumption with color codes and interleaved multi-container output that's hard to parse programmatically.Proposal
--output jsonfor structured log output with metadata (task name, step name, timestamp, message)--followworks well in non-interactive/agent contexts--timestampsin a parseable format (RFC3339)Example
{"task": "build", "step": "build-step", "timestamp": "2026-05-12T10:00:00Z", "message": "Building image..."} {"task": "build", "step": "build-step", "timestamp": "2026-05-12T10:00:01Z", "message": "Successfully built abc123"}NDJSON (one line per log entry) is the natural format here since logs are a stream.
/kind feature