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

Have a debug flag to show logging #23

Open
gebn opened this issue Aug 27, 2019 · 3 comments
Open

Have a debug flag to show logging #23

gebn opened this issue Aug 27, 2019 · 3 comments

Comments

@gebn
Copy link
Owner

gebn commented Aug 27, 2019

Useful for seeing the error messages produced by some BMCs, e.g. collect() []error. Adding and removing logging is doing it wrong.

@gebn
Copy link
Owner Author

gebn commented Sep 17, 2019

It makes a lot of sense to use prometheus/common/log, which can also add the consistent flags, e.g. for node_exporter

@gebn
Copy link
Owner Author

gebn commented Oct 25, 2019

This should just be -v, which switches log's output from /dev/null to stderr. This also works across library boundaries. Reserve stdout for non-bmc specific output, so you aren't drowned in log messages on busy exporters.

@gebn
Copy link
Owner Author

gebn commented Aug 22, 2020

The more modern way to do this is to allow changing the log level at runtime via an endpoint. The flag can specify an initial value.

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

No branches or pull requests

1 participant