We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I use fastify buildin logger, this logger is awesome, has builtin traceId feature and can access by request.log.info()
request.log.info()
https://fastify.dev/docs/v4.28.x/Reference/Logging/
It works.
const fastifyInstance = fastify({ logger: true, }); const app = await NestFactory.create<NestFastifyApplication>( AppModule, new FastifyAdapter(fastifyInstance), { logger: false, }, );
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: fastify/fastify#2120 fastify/help#140 https://fastify.dev/docs/latest/Reference/Routes/#custom-log-level
Give a config.
None
The text was updated successfully, but these errors were encountered:
If I understand you correctly, you want to know how to use request.log.info(), with @nestjs/platform-fastify package ?
@nestjs/platform-fastify
Sorry, something went wrong.
@Tony133, I need a configuration in nest to close some route log.
like this fastify.register(require('./routes/your-route'), { logLevel: 'silent' })
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
No branches or pull requests
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:
fastify/fastify#2120
fastify/help#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
The text was updated successfully, but these errors were encountered: