next-rest-framework icon indicating copy to clipboard operation
next-rest-framework copied to clipboard

Add logging

Open SaadBazaz opened this issue 1 year ago • 3 comments

Pino could do a good job.

SaadBazaz avatar Oct 15 '23 16:10 SaadBazaz

Yeah I think the existing logging could be improved for sure. What kind of information would you expect to see logged by the framework?

blomqma avatar Oct 18 '23 00:10 blomqma

Something more on the lines of how NestJS manages em. For production, they throw JSON in the terminal. For dev, it's formatted.

https://docs.nestjs.com/techniques/logger

Mostly we see: Status code Route Time hit User Agent Response

With the right colors.

SaadBazaz avatar Oct 19 '23 09:10 SaadBazaz

Something more on the lines of how NestJS manages em. For production, they throw JSON in the terminal. For dev, it's formatted.

https://docs.nestjs.com/techniques/logger

Mostly we see: Status code Route Time hit User Agent Response

With the right colors.

Seems reasonable. I could look into this at some point, keeping this issue open for now.

blomqma avatar Oct 19 '23 18:10 blomqma