express-winston
express-winston copied to clipboard
log response body based on status code.
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.