Included original exception when failed to write to local log file#336
Included original exception when failed to write to local log file#336
Conversation
22a92b8 to
8dd519a
Compare
|
should target dev branch |
There was a problem hiding this comment.
Pull Request Overview
This PR improves error handling when the AWS logging library fails to write to a local log file by including the original exception in the console output. Additionally, it updates AWS SDK dependencies to their latest versions.
- Enhanced error reporting to include the original exception when local file logging fails
- Updated AWS SDK dependencies (CloudWatchLogs, SecurityToken, Core) to newer versions
- Replaced deprecated User-Agent header manipulation with proper SDK API usage
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/AWS.Logger.Core/Core/AWSLoggerCore.cs | Enhanced exception handling and updated User-Agent implementation |
| src/AWS.Logger.Core/AWS.Logger.Core.csproj | Updated AWSSDK.CloudWatchLogs to version 4.0.8.4 |
| Multiple test project files | Updated AWSSDK.SecurityToken to version 4.0.2.6 |
| Sample project files | Updated AWSSDK.Core to version 4.0.0.32 |
| .autover/changes/*.json | Added changelog entries for the patch release |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| "Type": "Patch", | ||
| "ChangelogMessages": [ | ||
| "When failed to write to local log file write the original exception that triggered the reason for writing to the local log file to the console", | ||
| "Updated AWSSDK.CloudWatchLogs dependency to version AWS 4.0.8.4" |
There was a problem hiding this comment.
Corrected changelog message to remove extra 'AWS' prefix in version description.
| "Updated AWSSDK.CloudWatchLogs dependency to version AWS 4.0.8.4" | |
| "Updated AWSSDK.CloudWatchLogs dependency to version 4.0.8.4" |
…hat triggered the reason for writing to the local log file to the console Updated AWSSDK.CloudWatchLogs dependency to version AWS 4.0.8.4
8dd519a to
161dd08
Compare
Done, although I picked up a commit in |
Issue #, if available:
#329
Description of changes:
When there is a misconfiguration or connection issue sending request to CloudWatch Logs the library will write to a local log file to allow users to understand something went wrong with the exception of what happen. If you are in Lambda or some other read only file system the library then fails to write to the local file. Before this patch it would write to the console the exception for why it couldn't write to the local file. This PR adds to the console write to also include the original exception that triggered the need to ever write to the local log file.
I also updated to latest AWS SDK for .NET versions.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.