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

Inappropriate use of stderr #609

Open
jayennis22 opened this issue Aug 10, 2020 · 1 comment
Open

Inappropriate use of stderr #609

jayennis22 opened this issue Aug 10, 2020 · 1 comment

Comments

@jayennis22
Copy link

It strikes me as inappropriate for a health monitoring application like this to report the results of its monitors to stderr, especially since those errors and warnings often apply to different systems than the one where simplemonitor is running. The only messages I want to see from simplemonitor on stderr are messages about problems simplemonitor itself is experiencing, such as "Couldn't write to pidfile!", "Unknown alerter type %s; valid types are: %s", "Listener thread died :(".

Examples of messages I don't feel should use stderr include:

  • ERROR (simplemonitor) monitor failed: xxxxxx (Requests exception while opening URL: HTTPSConnectionPool(host='www.xxxx.com', port=443): Read timed out. (read timeout=5))
  • ERROR (simplemonitor) monitor failed: xxxxx (Destination unreachable: Host unreachable.)
  • WARNING (simplemonitor) monitor failed but within tolerance: xxxxxx

Thanks for hearing my opinion. I really appreciate your work on this!

@jamesoff
Copy link
Owner

Interesting, I'd not noticed stuff going to stdout/stderr differently, just because of the ways I'd interacted with it (i.e. both were merged). I agree, there's an argument for stderr just showing simplemonitor's runtime errors (and stdout getting monitor-related ones then?). That should be doable with suitable configuration of the Python logging library, and some small code changes to use the right logging instance at the right time. I'll give it some thought :)

Thanks for the feedback!

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

No branches or pull requests

2 participants