Skip to content
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

Including Exception and EventId in Lambda Logger messages #401

Merged
merged 3 commits into from
Feb 22, 2019

Conversation

karpikpl
Copy link
Contributor

Issue #, if available:
Microsoft.Extensions.Logging interface supports logging EventId and Exceptions, but when LambdaLogger is configured, those objects are not saved in CloudWatch.

Sample scenario:

logger.LogError(LoggingEvents.DbOperationError, ex, $"SelectData: {spName} SqlException Number: {se.Number} Sql Parameter: {spc}");

The natural expectation is that both Logging Event and Exception will be available in CloudWatch, which is not the case.

Description of changes:
I've included 2 new settings on Lambda Logger Options to enable EventId and Exceptions logging.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@normj
Copy link
Member

normj commented Feb 21, 2019

Thanks for the PR. I'll take a look

@normj normj merged commit 8d25d2e into aws:master Feb 22, 2019
@normj
Copy link
Member

normj commented Feb 22, 2019

This was released as version 2.2.0 of Amazon.Lambda.Logging.AspNetCore. Thangs again for the PR.

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.

None yet

2 participants