Proposal: use stderr for all log output, reserve stdout for machine readable output #2940
tjenkinson
started this conversation in
RFCs
Replies: 1 comment 7 replies
-
I've converted this to a discussion to hopefully solicit some more feedback. My initial thoughts are:
|
Beta Was this translation helpful? Give feedback.
7 replies
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.
Uh oh!
There was an error while loading. Please reload this page.
-
What are peoples thoughts on switching to stderr for all log output?
Then we could only use stdout for outputting json from commands that choose to support a
—json
flag (or potentially other formats for machine parsing that make sense)We could try and support things like
—json
in a way that means for those use cases stdout isn’t used, but that’s more complex and potentially more error prone than not using stdout at all.I’m wondering if a change like this would be considered breaking or not? If the current output is only meant to be human readable and not parsed, then possibly not.
Asking because I’d like a
—json
flag for page publishing that outputs the url and I’m wondering what direction to go in. I hacked together an approach that switches the logger into an stderr only mode but if we could always use stderr it would become a lot simpler, hence this issue :)refs #2927
refs #2437
Beta Was this translation helpful? Give feedback.
All reactions