hapijs / hapi-pino

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

Why log a 'warn' when a handler throws an exception? #74

Closed ryanhallcs closed 5 years ago

ryanhallcs commented 5 years ago

The readme correctly asserts the logger issues a log of a thrown error with the level warn (also see: https://github.com/pinojs/hapi-pino/blob/master/index.js#L81-L87)

I'm wondering the reason behind this, because I need to discern which logs to transport for proper error processing (i.e. needing to send to a system like Sentry or Raygun, or even simple log filtering for errors by level) - and lowering that threshold to warn doesn't sound correct to me. Curious if I'm misunderstanding something

mcollina commented 5 years ago

I don’t remember. There might be a rationale, but it has been lost in the years. Would you like to send a PR?

ryanhallcs commented 5 years ago

@mcollina - I know how that goes :) pr submitted