Normal output to stdout, error & diagnostic output to stderr #625
robsheldon
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have
mkcert
integrated into some automated process that do setup/teardown. A typical pattern for utilities invoked by these processes isfoo >/dev/null || error...
orif ! foo >/dev/null; then...
.In these cases, normal program output is suppressed, but if the program encounters an error, they probably write something to stderr and that gets collected in the overall process log and can be helpful for debugging.
By default, the log package used by
mkcert
sends all output to stderr, so now the pattern ismkcert 2>/dev/null
ormkcert >/dev/null 2>&1
.This might be related to #196. I get the reasoning for not adding a
-q
or--silent
option, but without that, and with all output (ordinary or otherwise) sent to stderr, my choices areCreated a new local CA 💥
etc. etc. in my logs, or no output at all in the event that something goes wrong.Beta Was this translation helpful? Give feedback.
All reactions