blomqma / next-rest-framework

Type-safe, self-documenting APIs for Next.js
https://next-rest-framework.vercel.app
Other
134 stars 17 forks source link

Add logging #80

Open SaadBazaz opened 10 months ago

SaadBazaz commented 10 months ago

Pino could do a good job.

blomqma commented 10 months ago

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

SaadBazaz commented 10 months ago

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.

blomqma commented 10 months ago

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.