-
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] nestjs-pino fails to log HTTP requests with global prefix #1849
Comments
Thanks for reporting, will get back to this as soon as possible |
Btw I just tried this on my machine locally, and I can see the request logs just fine. However, on checking OP's sample app I also face the same issue as them. I am using nestjs v10.0.0 but I couldn't solve the issue even on upgrading nestjs-pino and pino-http to the latest versions |
Has anyone found a workaround for this problem? I'm running into this problem too, it's frustrating. |
Is there any news about this ? |
The issue is in NestJS, it should be fixed when this PR will land: nestjs/nest#13886 As a workaround you can set the property |
Workaround works great for us. Thank you. |
Thanks for this workaround saved us a huge headache as we have realised newer services we've built had absolutely no logging and we also determined that the change to the The PR needs to be merged ASAP as this has broken critical services within our business |
@andreymyssak try |
What is the current behavior?
After setting a global prefix
app.setGlobalPrefix('/api')
inmain.ts
,nestjs-pino
unexpectedly stops logging HTTP requests. However, the logger's other functionalities remain operational.What is the expected behavior?
nestjs-pino
should consistently log HTTP requests even when a global prefix is applied.Please provide minimal example repo, not code snippet. Without example repo this issue will be closed.
npm i
.npm run start:dev
.localhost:3000/api
using a browser or Postman.Please mention other relevant information such as Node.js version and Operating System.
Node.js Version: v18.15.0
Operating System: MacOS Sonoma Version 14.2.1 (23C71)
The text was updated successfully, but these errors were encountered: