Skip to main content
Add the history.
Source Link
Stephen Kitt
  • 484k
  • 60
  • 1.2k
  • 1.4k

POSIX defines standard error as

for writing diagnostic output

This doesn't limit its use to error messages only. I would consider progress information as diagnostic output, so it belongs on standard error.

I know you’re looking for a specific, current guideline; but even without that I think it helps to consider the history of standard error. It was introduced along with pipes, so that output could be handled appropriately depending on whether it is “pipeable” or not (I think Brian Kernighan’s UNIX: A History and a Memoir describes this). Thus, program output which might be post-processed in normal operation goes to standard out, and everything else goes to standard error.

POSIX defines standard error as

for writing diagnostic output

This doesn't limit its use to error messages only. I would consider progress information as diagnostic output, so it belongs on standard error.

POSIX defines standard error as

for writing diagnostic output

This doesn't limit its use to error messages only. I would consider progress information as diagnostic output, so it belongs on standard error.

I know you’re looking for a specific, current guideline; but even without that I think it helps to consider the history of standard error. It was introduced along with pipes, so that output could be handled appropriately depending on whether it is “pipeable” or not (I think Brian Kernighan’s UNIX: A History and a Memoir describes this). Thus, program output which might be post-processed in normal operation goes to standard out, and everything else goes to standard error.

Source Link
Stephen Kitt
  • 484k
  • 60
  • 1.2k
  • 1.4k

POSIX defines standard error as

for writing diagnostic output

This doesn't limit its use to error messages only. I would consider progress information as diagnostic output, so it belongs on standard error.