In "utils.sh" there is a function called "run", with this comment:
"Log then execute the provided command".
This is the last row of the function:
"debug "Running${cmdline}" > /dev/stderr"
Please explain me why a debug message should go to the stderr instead of the stdout? (it's a debug message!)
Hi Ezio, it looks to be a general preference to have debugging messages sent to stderr instead of stdout. For example, from Stackoverflow :
Regular output (the actual result of running the program) should go on
stdout, things like diagnostic, notice, warning, error, etc, go onstderr.If there is no "regular output", I would say that it doesn't really matter which one you choose. You could argue that the logging is the only output, so that should go to
stdout. Or you could argue that it is still "exceptional information" which should go tostderr.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.