sensu / sensu-go

Simple. Scalable. Multi-cloud monitoring.
https://sensu.io
MIT License
1.02k stars 176 forks source link

Log handler error at error level instead of info level #5010

Closed fguimond closed 1 year ago

fguimond commented 1 year ago

What is this change?

When a handler returns an error (i.e. a non-zero return value) log the error at the error level instead of info.

Why is this change necessary?

Helps customers troubleshoot handler errors since they typically use the error log level by default. It prevents them from having to change the log level and restart the backend.

Does your change need a Changelog entry?

Added.

Do you need clarification on anything?

There was no error returned in case of handler so I left the behavior as is.

Were there any complications while making this change?

Have you reviewed and updated the documentation for this change? Is new documentation required?

No.

How did you verify this change?

Manual testing.

Is this change a patch?

No.