iamolegga / nestjs-pino

Platform agnostic logger for NestJS based on Pino with REQUEST CONTEXT IN EVERY LOG
MIT License
1.26k stars 98 forks source link

[QUESTION] Request received log not logged #896

Closed amit12cool closed 2 years ago

amit12cool commented 2 years ago

[ -] I've read the docs of nestjs-pino

[ -] I've read the docs of pino

[- ] I couldn't find the same question about nestjs-pino

Question

I have been using nestjs pino in my application and I the log for request received is not printed automatically when the request is received on a route.I have even implemented the customReceivedMessage function but the log is still not getting printed. Anything Im missing?

Please mention other relevant information such as Node.js version and Operating System.

iamolegga commented 2 years ago

Sorry, I didn't get the question. Do you need automatic log when request received, not completed, because this is not how it works by default. You can check logs in example in readme

amit12cool commented 2 years ago

Yes I need automatic log on request received. And this function customReceivedMessage is not getting called too.

iamolegga commented 2 years ago

please open minimal represented example repo, also check if same config works with pino-http

amit12cool commented 2 years ago

Ok..BTW is automatic logging supported for request received? Or only completed or errored is supported?

iamolegga commented 2 years ago

this lib is only a wrapper for pino-http. see the docs of it please

iamolegga commented 2 years ago

Closing this issue as it's a question about pino-http configuration. If desired behavior works with pino-http but not with nestjs-pino feel free to open a new bug report

amit12cool commented 2 years ago

Is it supported on the first go to print the automatic log on request received?

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: iamolegga @.> Sent: Wednesday, March 30, 2022 11:40:07 AM To: iamolegga/nestjs-pino @.> Cc: Amit Dhawan @.>; Author @.> Subject: Re: [iamolegga/nestjs-pino] [QUESTION] Request received log not logged (Issue #896)

please open minimal represented example repo, also check if same config works with pino-http

— Reply to this email directly, view it on GitHubhttps://github.com/iamolegga/nestjs-pino/issues/896#issuecomment-1082660776, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABTB2JECRMBW466DCC6LKEDVCPV37ANCNFSM5R6FQLEA. You are receiving this because you authored the thread.Message ID: @.***>