Skip to content

Commit

Permalink
chore: adding logging of request bodies if present
Browse files Browse the repository at this point in the history
  • Loading branch information
artursudnik committed Oct 16, 2023
1 parent 8192cc8 commit 86926b7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/vc-api/src/middlewares/http-logger.middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ export class HttpLoggerMiddleware implements NestMiddleware {
} else {
this.logger.log(message);
}

if (req.body) {
this.logger.debug(`request body: ${JSON.stringify(req.body)}`);
}
});

res.on('close', () => {
Expand Down

0 comments on commit 86926b7

Please sign in to comment.