Skip to content

nighthawk_client prints a stray line to stdout on the tunneling startup error path #1605

Description

@bpalermo

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions