Centralize logging for health indicator failures.
- Add
HealthLoggerclass to centralize logging for health indicator failures. - Remove
logExceptionIfPresentmethod fromAbstractHealthIndicatorandAbstractReactiveHealthIndicator. - Update
AbstractHealthIndicatorandAbstractReactiveHealthIndicatorto useHealthLogger.logExceptionIfPresent. - Add
exceptionfield toHealthclass and updateBuilderclass to set theexceptionfield. - Add
getExceptionmethod toHealthclass to retrieve the exception. - Update
HealthEndpointSupportto useHealthLogger.logExceptionIfPresent. - Add
HealthLoggerTestsclass to test theHealthLoggerclass.
Comment From: pivotal-cla
@josephabonasara Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.
Comment From: pivotal-cla
@josephabonasara Thank you for signing the Contributor License Agreement!
Comment From: philwebb
Thanks for the pull-request, but I'm afraid this wasn't quite what I had in mind. I should have put the pending-design-work label on that issue to make it clearer that we aren't ready for contributions just yet.
I think what we want to do is remove the logging entirely from the *HealthIndicator classes and instead make the calling code responsible for doing the logging. We're going to need a bit more time to really think about the design and the impact of such a change. I don't think we'll be really ready to start on this one until the new year.
Thanks anyway for your contribution and I'm sorry about any wasted effort.