unbuffered output
Output that is written out immediately, instead of being held in memory until a buffer fills.
In more detail
Programs often buffer standard output for speed, which delays log lines and can lose them if the process is killed. Twelve-factor apps write their event stream unbuffered; in Python, flush=True or the -u option does this.
Example
print(json.dumps(record), flush=True)Related terms
- standard output and standard error — The two channels a program writes normal output (stdout) and error messages (stderr) to, plus stdin for input.
- event stream — A continuous, time-ordered flow of events with no fixed beginning or end.
Taught in
- Disposability, Dev Prod Parity And Logs — DevOps & Site Reliability Engineering