What Is stdout? The Standard Output Stream
stdout (standard output) is the default stream a program writes its normal results to, usually the terminal or, in CI, the job log.
When a command prints a result, it normally writes it to stdout. This stream is what you see in your terminal and what shows up in CI logs. Keeping normal output on stdout, separate from errors on stderr, is what lets you pipe, capture, and filter program output cleanly.
What stdout is
stdout is file descriptor 1, the channel for a program's ordinary output. echo, printf, and most tools send their results here by default.
Redirecting stdout
You can send stdout to a file with > (overwrite) or >> (append). For example, node build.js > build.log captures the normal output into a file instead of the terminal.
Why separate from stderr
- stdout carries results; stderr carries diagnostics and errors.
- You can pipe stdout to another tool without errors muddying the data.
- CI can color or fold logs differently based on the stream.
Piping stdout
A pipe connects one program's stdout to the next program's stdin: ls | wc -l. Keeping clean data on stdout is what makes pipelines composable.
stdout in CI
CI captures stdout into the job log, so anything you print becomes part of the build record. Tools that emit machine-readable results to stdout can be parsed by later steps, which is how reports flow through a pipeline.
Logs on managed runners
Latchkey streams stdout into the live job log so you can watch a build as it runs. Writing clear, well-structured stdout makes debugging a failed run much faster.
Key takeaways
- stdout is the default output stream, file descriptor 1.
- Normal results go to stdout; it can be redirected or piped.
- CI captures stdout as the job log, so it is your main debugging record.