aws / aws/aws-encryption-sdk-python
Logging an exception instead of / and a `raise` pollutes the log with extra traceback.
- Vorherrschende Sprache
- Python
- Sterne
- 255
- Forks
- 92
- Ø Merge
- 2 T. 17 Std.
- Gemergte PRs (30 T.)
- 2
Beschreibung
### Problem:
In many places in the SDK codebase, there are exception logging using the `_LOGGER.exception`. This logs the traceback of the exception. The encountered exception might then be bubbled up to the caller, or to the exit call which then again logs this exception. This causes duplicate logging at best, and confusion at worst since the exception message/type can be different.
### Solution:
Clean up the logging, and use raise over logging the exception wherever possible.
Ref https://github.com/aws/aws-encryption-sdk-python/issues/566
[//]: # (NOTE: If you believe this might be a security issue, please email aws-security@amazon.com instead of creating a GitHub issue. For more details, see the AWS Vulnerability Reporting Guide: https://aws.amazon.com/security/vulnerability-reporting/ )
Beitragsleitfaden
Rechercherichtung
Durchsuche die SDK-Codebasis nach Verwendungen von `_LOGGER.exception` und sieh dir zur Kontextualisierung das zugehörige Issue #566 an. Verfolge, ob jede Exception an einen Caller oder Exit-Pfad weitergereicht wird, der sie erneut protokolliert; als erledigt gilt die Aufgabe, wenn redundante Traceback-Protokollierung entfernt wurde, die Exception aber weiterhin den zuständigen Caller erreicht.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- security
- Issue-Typ
- Refactoring
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100