aws / aws/aws-encryption-sdk-python
Logging an exception instead of / and a `raise` pollutes the log with extra traceback.
- Ngôn ngữ chính
- Python
- Star
- 255
- Fork
- 92
- Merge trung bình
- 2 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 2
Mô tả
### 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/ )
Hướng dẫn đóng góp
Hướng nghiên cứu
Tìm kiếm trong codebase của SDK các chỗ sử dụng `_LOGGER.exception` và xem issue liên quan #566 để biết ngữ cảnh. Theo dõi xem mỗi exception có được truyền lên một caller hoặc exit path ghi log lại exception đó hay không; được xem là hoàn tất khi việc ghi log traceback dư thừa được loại bỏ nhưng exception vẫn đến được caller phù hợp.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- security
- Loại issue
- Tái cấu trúc
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100