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

Make log level configurable via command-line flag #182

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

dswarbrick
Copy link
Member

As per other exporters in the Prometheus ecosystem, make log level configurable by leveraging the promlogflag package.

Also a small tweak to Client.Get() to identify specific stats endpoint that returns non-200 HTTP status.

As per other exporters in the Prometheus ecosystem, make log level
configurable by leveraging the promlogflag package.

Also a small tweak to Client.Get() to identify specific stats endpoint
that returns non-200 HTTP status.

Signed-off-by: Daniel Swarbrick <[email protected]>
@@ -47,7 +49,7 @@ const (
)

var (
logger = promlog.New(&promlog.Config{})
logger = log.NewNopLogger()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, maybe we should refactor this so we don't have a main package logger var.

@SuperQ SuperQ merged commit 5195bb3 into prometheus-community:master Aug 23, 2023
@dswarbrick dswarbrick deleted the log-level branch August 23, 2023 10:09
SuperQ added a commit that referenced this pull request Nov 6, 2024
* [CHANGE] Drop XML statistics v2 support #171
* [CHANGE] Deprecate collection of task stats by default #200
* [CHANGE] Update logging library #212
* [ENHANCEMENT] Add metric `rpz_rewrites` #208
* [BUGFIX] Make log level configurable via command-line flag #182

Signed-off-by: SuperQ <[email protected]>
@SuperQ SuperQ mentioned this pull request Nov 6, 2024
SuperQ added a commit that referenced this pull request Nov 6, 2024
* [CHANGE] Drop XML statistics v2 support #171
* [CHANGE] Deprecate collection of task stats by default #200
* [CHANGE] Update logging library #212
* [ENHANCEMENT] Add metric `rpz_rewrites` #208
* [BUGFIX] Make log level configurable via command-line flag #182

Signed-off-by: SuperQ <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants