I'm running into a weird issue with using WinstonLogger and whitelist request/response body
Following is what I'm trying to do
expressWinston.responseWhitelist.push('body')
app.use(expressWinston.logger({ winstonInstance: logger })) // logger is an object with custom winston logger format
However the response is not being logged, I had to get rid of the WinstonLogger instance for the whitelist to show up.
Found an issue with the custom logger that was passed in that may have affected the logging - the use of humanReadableUnhandledException in winston transports seems to be the issue. Closing issue.
I'm running into a weird issue with using WinstonLogger and whitelist request/response body
Following is what I'm trying to do
However the response is not being logged, I had to get rid of the WinstonLogger instance for the whitelist to show up.
The following is what worked for me:
I thought only transport and format options are affected when we use a WinstonLogger?