Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#2,693 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@Firehed ci sta già lavorando.

Dal 7/10/2026.

  • #2694 di @Firehed — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
docker, go, google-cloud

Direzione di ricerca

The issue points to the logger setup rework in #2106 and the earlier fix in #1750; start by comparing how --quiet and --structured-logs configure logging. Reproduce with the provided command and verify that errors, including multiline details, remain JSON with a severity field. A linked pull request (#2694) is already open.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Bug Description

When --structured-logs and --quiet are used together, error messages are written as plain text instead of JSON. This is the behavior reported in #1738 and fixed in v2.2.0 by #1750, so it is a regression.

Plain-text errors lose the severity field, and multi-line errors (for example, Google API errors with a Details: block) are split into separate entries by log collectors such as the GKE logging agent.

Bisecting the released images: v2.9.0 behaves correctly, and v2.10.0 through v2.26.0 (the latest as of this report) are affected. The change in behavior lines up with #2106, which reworked how the logger is set up.

Example code (or command)
cloud-sql-proxy --structured-logs --quiet --token=fake fake-proj:us-central1:fake-inst
Stacktrace
# v2.9.0 (expected)
{"severity":"ERROR","timestamp":"2026-10-07T23:07:14.054Z","message":"[fake-proj:us-central1:fake-inst] could not resolve instance version: ..."}

# v2.26.0 (actual)
2026/10/07 23:07:05 [fake-proj:us-central1:fake-inst] could not resolve instance version: failed to get instance: refresh error: ...
Details:
[
  {
    "@type": "type.googleapis.com/google.rpc.ErrorInfo",
...
Steps to reproduce?
  1. docker run --rm gcr.io/cloud-sql-connectors/cloud-sql-proxy:2.26.0 --structured-logs --quiet --token=fake fake-proj:us-central1:fake-inst
  2. Errors on stderr are plain text.
  3. The same command with :2.9.0, or with --quiet removed, produces JSON errors.
Environment
  1. OS type and version: the official container images, run under Docker 29.4.0
  2. Cloud SQL Proxy version: 2.10.0 through 2.26.0
  3. Proxy invocation command: as above

This issue was written by AI (Claude Code).

Lingua principale
Go
Stelle
1.4k
Fork
356
Merge medio
14h 48m
PR unite (30g)
8

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di GoogleCloudPlatform/cloud-sql-proxy

Tutte le issue di GoogleCloudPlatform/cloud-sql-proxy

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.