Skip to content

fix: keep structured logs when --quiet is set - #2694

Merged
kgala2 merged 2 commits into
GoogleCloudPlatform:mainfrom
Firehed:fix-quiet-structured-logs
Oct 13, 2026
Merged

kgala2 merged 2 commits into
GoogleCloudPlatform:mainfrom
Firehed:fix-quiet-structured-logs

Conversation

@Firehed

@Firehed Firehed commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Fixes #2693.

With --structured-logs and --quiet both set, the structured logger was created and then replaced by the plain-text quiet logger, so errors were written as plain text instead of JSON. NewStructuredLogger already takes quiet and drops info-level output itself, so the plain-text quiet logger is now only used when structured logs are off.

This restores the behavior from #1750 (the fix for #1738), which was lost when the logger setup moved in #2106. The new test covers the combined flags so this doesn't regress again.

🤖 Generated with Claude Code

@Firehed
Firehed requested a review from a team as a code owner October 7, 2026 23:23
@google-cla

google-cla Bot commented Oct 7, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@kgala2

kgala2 commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

/gcbrun

@kgala2

kgala2 commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Thanks @Firehed for tracking this regression back to #2106 and adding a test to guard it, LGTM.

One blocker: the CLA check is failing on the Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com trailer (your own CLA is fine). Could you drop that trailer from both commits and force-push? The check should go green after that.

@Firehed
Firehed force-pushed the fix-quiet-structured-logs branch from 38cf3bc to 663f3eb Compare October 7, 2026 23:44
@Firehed

Firehed commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

@kgala2 force push is done and I now see the CLA check passing. Let me know if you need anything else!

@kgala2

kgala2 commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

/gcbrun

@kgala2
kgala2 force-pushed the fix-quiet-structured-logs branch from d4a9471 to ce69429 Compare October 13, 2026 22:02
@kgala2
kgala2 enabled auto-merge (squash) October 13, 2026 22:20
@kgala2
kgala2 merged commit 4b77b57 into GoogleCloudPlatform:main Oct 13, 2026
19 of 20 checks passed
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.

Regression: --quiet disables --structured-logs again

3 participants