Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise and catch warnings or handle logging #22

Open
benoitbryon opened this issue Feb 4, 2014 · 1 comment
Open

Raise and catch warnings or handle logging #22

benoitbryon opened this issue Feb 4, 2014 · 1 comment

Comments

@benoitbryon
Copy link
Member

Currently, hospital is binary: pass or fail.
Sometimes information is not blocker, so we do not want an error, but a warning.

As an example, while I check for example.com availability, I want a failure if it does not return HTTP 200 within 1 second. But I want a warning if it is "slow" i.e. if answer was received in more than 0.5 second.

See:

@benoitbryon benoitbryon modified the milestones: Later, Soon Feb 4, 2014
@benoitbryon
Copy link
Member Author

Perhaps using logging would be smarter than using exeptions for that purpose:

  • While running the healthchecks, catch AssertionError and convert them into logger.error()
  • Healthchecks may log warnings, debug or info too.
  • The healthcheck view (CLI or WSGI) displays the logs.
  • The healthcheck view (CLI or WSGI) returns success if there is no log of level error/critical. It returns failure if there are logs of level error/critical.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant