-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
direct stderr output to stderr again #400
Conversation
@@ -158,6 +158,8 @@ def prepare_arguments(parser): | |||
help='Print output from commands in ordered blocks once the command finishes.') | |||
add('--interleave-output', '-i', action='store_true', default=False, | |||
help='Prevents ordering of command output when multiple commands are running at the same time.') | |||
add('--split-stderr', '-e', action='store_false', dest='merge_stderr_into_stdout', default=True, | |||
help='Direct stderr output to stderr again, instead of merging it with stdout (which is the default)') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The help should maybe not contain the "again"?
I notice that when running Would I get the full output of stderr and stdout interleaved correctly, or would I get them as two blocks one after another and not interleaved when I run with the added option to split stdout and stderr? |
I guess, this is intended. Otherwise output from different jobs might be interleaved. You can enforce interleaved output with option
Didn't tried this, yet. In any case, the actual output you will see strongly depends on the buffering mode that is performed on stdout/stderr. By default stdout is buffered, while stderr is not, which will mix up the actual output! |
@NikolausDemmel You would need to use |
Thanks for the hints. I wasn't actually aware of that flag. |
Oh and you don't need the |
Looking at this now, is there any benefit to outputting the error to stdout? It is already being captured separately, this only affects the printing, and so it shouldn't affect the output ordering. A calling program could always pipe the stderr of catkin build to stdout if they wished. I'm trying to come up with a reason that catkin build should need to do it itself. @jbohren I imagine you're super busy at your new gig (congrats btw 😄), but perhaps you could give your perspective on why errors currently go to stdout in the first place? I'm inclined to drop the option and just output errors to stderr always. |
Fix for #396.