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

fix(log): display nested objects in lambda request and response in @middy/input-output-logger #1227

Closed
wants to merge 1 commit into from

Conversation

minjie0501
Copy link

Currently, nested objects, such as identity within the requestContext of the request event, are displayed as [Object] in the logs. This makes it difficult to debug and understand the full structure of the request and response objects.

Updating the logging mechanism to stringify nested objects using JSON.stringify(cloneMessage, null, 2) ensures that all nested objects are properly represented in the logs, making them more readable and informative.

@minjie0501 minjie0501 changed the title fix(log): display nested objects in lambda request and response fix(log): display nested objects in lambda request and response in @middy/input-output-logger Jul 18, 2024
@willfarrell
Copy link
Member

Thanks for the PR! I like the idea of having the default be more usable out of the box.

See my inline comment about proposed changes. Unit tests will also need to be updated before release.

@minjie0501
Copy link
Author

Thanks for the PR! I like the idea of having the default be more usable out of the box.

See my inline comment about proposed changes. Unit tests will also need to be updated before release.

I don't see any inline comments 🤔

@minjie0501 minjie0501 deleted the fix/log-display branch August 11, 2024 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants