Skip to content

Log status messages to stderr if using JSON/YAML output - #1845

Open
adamchalmers wants to merge 3 commits into
mainfrom
achalmers/progress_msgs
Open

Log status messages to stderr if using JSON/YAML output#1845
adamchalmers wants to merge 3 commits into
mainfrom
achalmers/progress_msgs

Conversation

@adamchalmers

@adamchalmers adamchalmers commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

The Zoo CLI lets you specify an output format, including human-friendly output formats (like plaintext or tables) and machine-readable ones (JSON, YAML).

Human-friendly formats should log status messages (like "processed 4 files" or "wrote image to foo.png") to stdout, because that's where humans expect them. But for machine-readable formats (like json), they should log statuses to stderr, to avoid breaking parsers if you do zoo | jq.

Closes #1757

@codecov

codecov Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.18%. Comparing base (c8505dd) to head (5fba7b0).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1845      +/-   ##
==========================================
+ Coverage   66.11%   66.18%   +0.06%     
==========================================
  Files          43       43              
  Lines        8434     8451      +17     
==========================================
+ Hits         5576     5593      +17     
  Misses       2858     2858              
Flag Coverage Δ
unittests 66.18% <100.00%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Structured-output commands print human progress text to stdout, breaking --format json | jq

1 participant