From fada6f08f842fee2e4f4eaf64fa578be53d01d27 Mon Sep 17 00:00:00 2001 From: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com> Date: Fri, 25 Apr 2025 01:05:57 +0530 Subject: [PATCH] fix(api): add req to the child logger (#59961) --- api/src/plugins/not-found.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/plugins/not-found.ts b/api/src/plugins/not-found.ts index c5a636c948b..152646da902 100644 --- a/api/src/plugins/not-found.ts +++ b/api/src/plugins/not-found.ts @@ -15,7 +15,7 @@ const fourOhFour: FastifyPluginCallback = (fastify, _options, done) => { // If the request accepts JSON and does not specifically prefer text/html, // this will return a 404 JSON response. Everything else will be redirected. fastify.setNotFoundHandler((req, reply) => { - const logger = fastify.log.child({}); + const logger = fastify.log.child({ req }); logger.info('User requested path that does not exist'); const accepted = req.accepts().type(['json', 'html']);