NestJS · Middle · Question 66 of 75
How can you log every request with timing in Nest?
- 1Nest logs nothing by design
- ✓Correct answer: With middleware or an interceptor that records the start time and logs method, path, status and duration when the response finishes
- 3With a pipe
Explanation
Libraries like nestjs-pino do this out of the box with structured JSON logs and request IDs.