Title: nighthawk_client prints a stray line to stdout on the tunneling startup error path
Description:
When the encapsulating Envoy fails to start (--tunnel-uri), ProcessImpl writes error caught by envoy ... to std::cout in addition to logging it (source/client/process_impl.cc). stdout is where nighthawk_client writes its formatted result, so a consumer parsing --output-format json sees a non-JSON line first in that error case. The message should go to the logger (stderr) only, keeping stdout reserved for the output.
Reproduction steps:
Run with a tunnel URI whose Envoy bootstrap fails to start, e.g. an unresolvable --tunnel-uri, with --output-format json, and capture stdout separately from stderr.
Logs:
error caught by envoy <exception text> <- on stdout, before the JSON
Call Stack:
Not a crash.
Title: nighthawk_client prints a stray line to stdout on the tunneling startup error path
Description:
When the encapsulating Envoy fails to start (
--tunnel-uri),ProcessImplwriteserror caught by envoy ...tostd::coutin addition to logging it (source/client/process_impl.cc). stdout is wherenighthawk_clientwrites its formatted result, so a consumer parsing--output-format jsonsees a non-JSON line first in that error case. The message should go to the logger (stderr) only, keeping stdout reserved for the output.Reproduction steps:
Run with a tunnel URI whose Envoy bootstrap fails to start, e.g. an unresolvable
--tunnel-uri, with--output-format json, and capture stdout separately from stderr.Logs:
Call Stack:
Not a crash.