diff --git a/lib/plugins/requestContextProviderPlugin.ts b/lib/plugins/requestContextProviderPlugin.ts index 337defe..8ab812d 100644 --- a/lib/plugins/requestContextProviderPlugin.ts +++ b/lib/plugins/requestContextProviderPlugin.ts @@ -55,7 +55,9 @@ function plugin(fastify: FastifyInstance, opts: unknown, done: () => void) { next: HookHandlerDoneFunction, ) { req.reqContext = { - logger: req.log, + logger: req.log.child({ + requestId: req.id, + }), reqId: req.id, }