-
Notifications
You must be signed in to change notification settings - Fork 145
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
docs(logger): add logEventIfEnabled() docs #2924
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small text correction, but not mandatory. Feel free to not accept and merge without them.
Co-authored-by: Leandro Damascena <leandro.damascena@gmail.com>
Co-authored-by: Leandro Damascena <leandro.damascena@gmail.com>
Co-authored-by: Leandro Damascena <leandro.damascena@gmail.com>
No, they are good suggestions - accepted all of them. |
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
APPROVED!
Summary
Changes
This PR adds to both the documentation and API docs info about the previously undocumented
logEventIfEnabled()
method in Logger.This method allows customers who are not using Middy.js middleware nor class method decorators to optionally log the incoming event when the
POWERTOOLS_LOGGER_LOG_EVENT
environment variable is set totrue
.The updated section in the Logger docs looks like this:
The newly added code example, and its tooltip, look like this:
Similar tooltips have been added to the Middy.js middleware and class method decorator examples:
Finally, I have also added an example event and output to show what it's going to be logged:
Issue number: closes #1904
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.