funnel icon indicating copy to clipboard operation
funnel copied to clipboard

Make it easier to capture stderr

Open earthboundkid opened this issue 7 years ago • 3 comments

From the README, to capture stderr, you need to do:

$/etc/myapp/bin 2>&1 | funnel

What if instead you could do: funnel -cmd '/etc/myapp/bin'? Then it could capture all stdout and stderr on its own.

earthboundkid avatar Nov 17 '16 19:11 earthboundkid

Not bad :) I guess its a matter of aesthetics. And also, since anyway its collating both stdout and stderr in a single stream, it doesn't matter much.

However, I have a feeling there might be requests to capture stdout and stderr separately in the future. I will keep this in the backburner.

agnivade avatar Nov 17 '16 19:11 agnivade

I don't think this is the right move. The SOP in System V and upstart scripts is to start the service with output redirection. It keeps the process tree clean and makes using flags and piping cleaner and easier to read.

flowchartsman avatar Nov 22 '16 01:11 flowchartsman

Right, I am a fan of piping too. It feels like the natural unix approach.

Its just that a few people have raised the concern that it should capture from stdout and stderr both by default (i.e. without doing any redirection). This issue is just to track that in case it becomes a big pain point. And its great that we have opinions from both sides of the table. Allows people to know the tradeoffs :)

agnivade avatar Nov 22 '16 04:11 agnivade