Logging: the AWS SDK's loggers follow a DEBUG root (the HTTP client's are held at WARNING)

Offen Anfängerfreundlich
#1,813 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
82/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
aws, python
Bereich
backend

Rechercherichtung

Beginne in backend/app/core/logger.py und lies nach, wie HTTP_CLIENT_LOGGERS angewendet wird, wenn das Logging konfiguriert wird. Füge der Liste die im Issue genannten AWS SDK-Logger hinzu. Konfiguriere anschließend das Logging auf DEBUG und überprüfe, dass der Regressionstest zeigt, dass Datensätze dieser Logger unterhalb von WARNING keinen Handler erreichen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug

With LOG_LEVEL=DEBUG the API's root logger is at DEBUG, and the AWS SDK's loggers (botocore, boto3, s3transfer) follow it, so the SDK's request tracing turns on with everything else.

backend/app/core/logger.py already holds the HTTP client's loggers (httpx, httpcore) at WARNING through HTTP_CLIENT_LOGGERS, which is re-applied every time logging is configured. The AWS SDK's loggers are not on that list.

Fix. botocore, boto3 and s3transfer join httpx and httpcore in HTTP_CLIENT_LOGGERS, so a DEBUG root no longer turns on the AWS SDK's request tracing. A regression test configures logging at DEBUG and checks that no record below WARNING from those loggers reaches a handler.

Planned for the first release after 0.44.1.

Vorherrschende Sprache
Python
Sterne
0
Forks
4
Ø Merge
7 Std. 47 Min.
Gemergte PRs (30 T.)
427

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus Controlvar/controlvar

Alle Issues in Controlvar/controlvar

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.