Skip to content

Log error chain to CloudWatch Logs #413

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

mlafeldt
Copy link

@mlafeldt mlafeldt commented Feb 9, 2022

The anyhow crate will only include the error chain with {:?} or {:#}.

Without this change, only the last error will be logged to CloudWatch and all underlying causes are lost when using with_context to augment errors.

Fixes #348

By submitting this pull request

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I confirm that I've made a best effort attempt to update all relevant documentation.

The anyhow crate will only include the error chain with {:?} or {:#}.

Without this change, only the last error will be logged to CloudWatch
and all underlying causes are lost when using with_context to augment
errors.

Fixes awslabs#348
@mlafeldt mlafeldt force-pushed the cloudwatch-error-chain branch from cd89e7d to 018b2cf Compare February 9, 2022 10:27
@mlafeldt mlafeldt changed the title Log error chain to CloudWatch Log error chain to CloudWatch Logs Feb 9, 2022
@calavera calavera self-requested a review February 9, 2022 15:58
Copy link
Contributor

@calavera calavera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this change is not as simple as we thought. There are errors now because some traits need to implement the Debug trait 😔

@calavera
Copy link
Contributor

I've addressed the build errors in #418

@calavera calavera closed this Feb 17, 2022
@mlafeldt mlafeldt deleted the cloudwatch-error-chain branch February 17, 2022 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Logging error chains to CloudWatch
2 participants