DEV Community

Discussion on: Logging REST API

 
patarapolw profile image
Pacharapol Withayasakpunt • Edited

I use fastify which uses pino, which automatically log to console; but this can easily be a bad idea.

  • Too much text, and it will be trimmed.
  • Not using advantage of Chrome DevTools. Haven't tried --inspect flag yet.
  • Maybe logged history of a session inside a temporary database would be helpful?

Also, of course, I don't know how to make pino work well with GCR. As far as I read the guide, it still requires a decision of "what to log"?