Open daimalou opened 1 week ago
If I understand you correctly, you want to know how to use request.log.info()
, with @nestjs/platform-fastify
package ?
@Tony133, I need a configuration in nest to close some route log.
like this fastify.register(require('./routes/your-route'), { logLevel: 'silent' })
I found the key code. I'll try modifying it. https://github.com/nestjs/nest/tree/master/packages/platform-fastify/decorators https://github.com/nestjs/nest/blob/master/packages/platform-fastify/adapters/fastify-adapter.ts#L726
Is there an existing issue that is already proposing this?
Is your feature request related to a problem? Please describe it
I use fastify buildin logger, this logger is awesome, has builtin traceId feature and can access by
request.log.info()
https://fastify.dev/docs/v4.28.x/Reference/Logging/
It works.
But this logger log every request and response. I find a solution to close some route. But In Nest I can't find place to config.
solution: https://github.com/fastify/fastify/issues/2120 https://github.com/fastify/help/issues/140 https://fastify.dev/docs/latest/Reference/Routes/#custom-log-level
Describe the solution you'd like
Give a config.
Teachability, documentation, adoption, migration strategy
None
What is the motivation / use case for changing the behavior?
None