python-hospital / hospital

Tools to diagnose Python projects (supervision, monitoring).
Other
40 stars 8 forks source link

Raise and catch warnings or handle logging #22

Open benoitbryon opened 10 years ago

benoitbryon commented 10 years ago

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 commented 10 years ago

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