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

log response body based on status code. #260

Open
shashanksapre opened this issue Jan 22, 2021 · 0 comments
Open

log response body based on status code. #260

shashanksapre opened this issue Jan 22, 2021 · 0 comments

Comments

@shashanksapre
Copy link

In the readme like it's given an example of how to change the log level based on the response status code. Is it possible to push response body parts to responseWhitelist array based on response status code?

For example, when the response status code is 400, my express server responds with error code, error message, and error description. If the response status is 404, there's no body. So I want to log code, message, and description when the status code is 400.

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

No branches or pull requests

1 participant