hapijs / hapi-pino

🌲 Hapi plugin for the Pino logger
MIT License
148 stars 61 forks source link

Request completed message is not super useful #155

Closed AdriVanHoudt closed 2 years ago

AdriVanHoudt commented 2 years ago

The default message for the request completed log is request completed. Which is not really useful. And definitely not in logging solutions like Google Cloud log where it uses this as the message to show.

image

The workaround is to add the needed fields to the summary of the log line but I think it might be more useful to log a summary of the request. e.g. [response] get /version 200 (29ms) => [event type] method url statusCode (responseTime)

mcollina commented 2 years ago

Would you like to send a Pull Request to address this issue? Remember to add unit tests.

AdriVanHoudt commented 2 years ago

Will do, I opened an issue to make sure it would be accepted.