Closed ghost closed 4 years ago
utils.log
seems to have some handling when console.log
fails. I'm assuming that was added on purpose due to some issue, so I think we should try to respect that as well.
fixed
@ydshah2, can you mention this PR (#43) in #42 by saying this PR is intended to solve the issue? Thanks a lot in advance!
Adding discussions with @matt-march and @andkon, the change is not just to fix #42. That is what started the discussion. It is a move towards good design across the board. We are also keeping the stderr for internal output for both json and regular usecase for the sake of consistency. It is in line with what tools like curl do - something people are already familiar with. This will be a breaking change, and the version change will reflect that but the idea is to just do it the right way rather than add a flag just to satisfy the issue or for not being breaking.
Plaintext summary lines, 'no result' lines, and internal errors are sent to stderr to not interfere with actual data for tail and search. This also fixes https://github.com/logdna/logdna-cli/issues/42 where piping output from tail and search under json flag would break due to summary line.
Before
After