aws / aws/aws-encryption-sdk-python
Logging an exception instead of / and a `raise` pollutes the log with extra traceback.
- 主要语言
- Python
- 星标
- 255
- 派生
- 92
- 平均合并
- 2 天 17 小时
- 30 天内合并 PR
- 2
描述
### 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/ )
贡献指南
调研方向
在 SDK 代码库中搜索 `_LOGGER.exception` 的使用位置,并查看相关 issue #566 以了解上下文。跟踪每个异常是否会向上传递到再次记录该异常的 caller 或退出路径;完成的标准是移除冗余的 traceback 日志记录,同时异常仍能到达适当的 caller。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- security
- Issue 类型
- 重构
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100