Closed kavithaii closed 4 years ago
When the resource-server (crud-server
) is started in development mode, and a client makes an erroneous request, we want to see the error response logged to console
. We are using morgan and I recall at some point there were console logs but now we don't see it. This is most likely in how and where the next
middleware gets invoked.
Logging enabled with standard option. Tried to log response body in case of an error. This didn't work as expected. Found workaround at https://code-examples.net/en/q/12532c2 Didn't want to write such extensive code just to print body, so enabled logging with standard option
The task was to demonstrate error logging by investigating how and where the next
middleware gets invoked. More specifically how to funnel all error responses throw a single channel. I would appreciate if you discuss before closing an issue. I will take it from here. Thanks.
Closing this. Superseded by #131.
Log error to console in development