I have seen stdout and stderr used in a variety of different ways - as far as I understand, it is common to use stdout for general information and stderr for errors and the like. However, I have also seen stderr used to output information messages related to the program itself (but not related to errors, warnings, debugging etc) and for debugging purposes (I assume the latter uses the error stream so that it can be filtered out to aid debugging), and stdout for the more serious warnings which I would have thought would have belonged in stderr.
So, I was wondering - when is it seen as ideal to use stdout or stderr in relation to what the program is outputting, aside from general output and errors? Is it more program-dependent, or more generic than that?
stderris more for program-to-program or some other kind of not-really-for-the-user type of output, andstdoutis for general output to the user? – Joe Dec 03 '15 at 21:19stdoutisn't for the user, though it may not be, but that it's the main expected result of the program (possibly as a transformation of the input), whilestderris for exceptional conditions. – Tom Hunt Dec 03 '15 at 21:30stderrshouldn't be used for errors or logging really, but it is used for that? – Joe Dec 03 '15 at 22:44