Nest.js log incoming request using interceptor
Tuesday, December 8, 2020
It is common to do audit logging for a json-over-http RESTful API server. What should be logged depends on your business logic and requirements while very often we need to access both the request object and the actual response. And we want to handle them in one place.
In Express, we attach a series of middleware to handle our route, i.e., by calling the next() function to pass the handle to our next middleware.…