Skip to content

feat(output): redirect trace output to stderr #1084

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thevilledev
Copy link
Contributor

@thevilledev thevilledev commented Mar 6, 2025

Allow trace output with any non-standard output format by writing trace to stderr while maintaining formatted output on stdout. This enables using --trace with table, JSON, etc. formats.

Currently, when using --trace with any non-standard output format, no traces are shown at all. The new behavior actually adds functionality by showing traces in stderr while maintaining the formatted output in stdout. Scenarios where non-standard output is piped to another process will continue to work without breaking changes.

For the default output format (stdout), traces still go to stdout for backwards compatibility.

Fixes #1031

Allow trace output with any non-standard output format by
writing trace to stderr while maintaining formatted output on stdout.
This enables using `--trace` with table, JSON, etc. formats.

Currently, when using `--trace` with any non-standard output
format, no traces are shown at all. The new behavior actually
adds functionality by showing traces in stderr while maintaining
the formatted output in stdout. Scenarios where non-standard
output is piped to another process will continue to work without
breaking changes.

For the default output format (stdout), traces still go to
stdout for backwards compatibility.

Signed-off-by: Ville Vesilehto <[email protected]>
@thevilledev thevilledev marked this pull request as ready for review April 9, 2025 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trace is not outputted when --output=table
1 participant