aws / aws/aws-encryption-sdk-python
Logging an exception instead of / and a `raise` pollutes the log with extra traceback.
- Langage dominant
- Python
- Étoiles
- 255
- Forks
- 92
- Merge moyen
- 2 j 17 h
- PR mergées (30 j)
- 2
Description
### 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/ )
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Recherchez dans la base de code du SDK les utilisations de `_LOGGER.exception` et consultez l’issue associée #566 pour le contexte. Vérifiez si chaque exception est propagée jusqu’à un caller ou un chemin de sortie qui la journalise à nouveau ; le travail est considéré comme terminé lorsque la journalisation redondante de la traceback est supprimée, tout en veillant à ce que l’exception atteigne toujours le caller approprié.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- security
- Type d'issue
- Refactorisation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100