-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
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
[BUG] #1351
Comments
If you create a bug issue you have to provide minimal example repo with the bug. Unfortunately I'm unable to to guess what's misconfigured in your particular case. 90% of issues is modules order (pino should go first). Also |
I am sorry, it was on our private repo. I will try to create a repo with valid example. Regaring the |
Hi @iamolegga ,
Once the example is running you can see the log output {"level":50,"time":1677579321632,"pid":21361,"hostname":"GuyL-Mac-8.local","reqId":"req-1","context":"AppController","foo":"bar","msg":"baz qux"} I hope this helps |
Thanks, will get back to this soon |
i'm stuck on this too, waiting for your good news!
|
Sorry, still struggling to find time for this as I'm not using the fastify adapter (and I recommend switching to express if possible, it works more stable and has fewer open issues for this lib). In the meantime PRs are welcome. |
Hi everyone, I found a root cause of this. Fastify generates the res.id on its own, and in pino-http library, they have a check. If id already exists - then use it, otherwise generate one using a default method or custom. also created a simple test in nest-pino, probably will be useful for someone
regarding the workaround, in my case, I'm just implementing genReqId function in fastify adapter itself.
|
What is the current behavior?
Hello I've been trying to replace our logger in NestJs to Pino using Nestjs-pino.
Tested it on the example project and it's working but our production project it's not working. We are using NestJs 9 with Fastify
Am I missing something?
This is the output
What is the expected behavior?
I expect to see requestId as 'temp'
Please mention other relevant information such as Node.js version and Operating System.
The text was updated successfully, but these errors were encountered: