-
Notifications
You must be signed in to change notification settings - Fork 798
chore!: adopt log/slog, drop go-kit/log #942
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
Merged
sysadmind
merged 4 commits into
prometheus-community:master
from
tjhop:chore/adopt-slog
Oct 17, 2024
Merged
chore!: adopt log/slog, drop go-kit/log #942
sysadmind
merged 4 commits into
prometheus-community:master
from
tjhop:chore/adopt-slog
Oct 17, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cc: @SuperQ |
Same here, just needs a rebase for the linter. |
Signed-off-by: TJ Hoplock <[email protected]>
Signed-off-by: TJ Hoplock <[email protected]>
The bulk of this change set was automated by the following script which is being used to aid in converting the various exporters/projects to use slog: https://gist.github.com/tjhop/49f96fb7ebbe55b12deee0b0312d8434 In addition to the parts that were straightforward conversions, this also: - refactors much of the logging config to adopt slog - removed custom `logger.go` setup for go-kit - adopt promslog/flag and use that to handle parsing log level/format flags - for consistent behavior, keep log output flag to allow toggle stdout/stderr for output - adopt promslog for logger setup - enables sloglint in golangci-lint config - drops go-kit/log exclusions from lint config - tidies mods to drop go-kit/log and go-logfmt/logfmt deps Signed-off-by: TJ Hoplock <[email protected]>
Fixes: ``` WARN [config_reader] The configuration option `linters.errcheck.exclude` is deprecated, please use `linters.errcheck.exclude-functions`. ``` Signed-off-by: TJ Hoplock <[email protected]>
5f69a1d
to
ac9a75e
Compare
Rebased 👍 |
sysadmind
approved these changes
Oct 17, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
sysadmind
added a commit
to sysadmind/elasticsearch_exporter
that referenced
this pull request
Oct 17, 2024
- Update README to include section about configuring the logging settings. - Update CHANGELOG with information about breaking changes in the logging output from prometheus-community#942. Signed-off-by: Joe Adams <[email protected]>
sysadmind
added a commit
that referenced
this pull request
Oct 17, 2024
- Update README to include section about configuring the logging settings. - Update CHANGELOG with information about breaking changes in the logging output from #942. Signed-off-by: Joe Adams <[email protected]>
rtkkroland
pushed a commit
to rtkwlf/elasticsearch_exporter
that referenced
this pull request
Jan 28, 2025
The bulk of this change set was automated by the following script which is being used to aid in converting the various exporters/projects to use slog: https://gist.github.com/tjhop/49f96fb7ebbe55b12deee0b0312d8434 In addition to the parts that were straightforward conversions, this also: - refactors much of the logging config to adopt slog - removed custom `logger.go` setup for go-kit - adopt promslog/flag and use that to handle parsing log level/format flags - for consistent behavior, keep log output flag to allow toggle stdout/stderr for output - adopt promslog for logger setup - enables sloglint in golangci-lint config - drops go-kit/log exclusions from lint config - tidies mods to drop go-kit/log and go-logfmt/logfmt deps Signed-off-by: TJ Hoplock <[email protected]> * ci: update deprecated golangci-lint config Fixes: ``` WARN [config_reader] The configuration option `linters.errcheck.exclude` is deprecated, please use `linters.errcheck.exclude-functions`. ``` Signed-off-by: TJ Hoplock <[email protected]> --------- Signed-off-by: TJ Hoplock <[email protected]>
rtkkroland
pushed a commit
to rtkwlf/elasticsearch_exporter
that referenced
this pull request
Jan 28, 2025
…#945) - Update README to include section about configuring the logging settings. - Update CHANGELOG with information about breaking changes in the logging output from prometheus-community#942. Signed-off-by: Joe Adams <[email protected]>
SuperQ
added a commit
that referenced
this pull request
Feb 26, 2025
BREAKING CHANGES: The flag `--es.slm` has been renamed to `--collector.slm`. The logging system has been replaced with log/slog from the stdlib. This change is being made across the prometheus ecosystem. The logging output has changed, but the messages and levels remain the same. The `ts` label for the timestamp has bewen replaced with `time`, the accuracy is less, and the timezone is not forced to UTC. The `caller` field has been replaced by the `source` field, which now includes the full path to the source file. The `level` field now exposes the log level in capital letters. * [CHANGE] Rename --es.slm to --collector.slm #932 * [CHANGE] Replace logging system #942 * [ENHANCEMENT] Add external refresh stats #933 Signed-off-by: SuperQ <[email protected]>
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The bulk of this change set was automated by the following script which
is being used to aid in converting the various exporters/projects to use
slog:
https://gist.github.com/tjhop/49f96fb7ebbe55b12deee0b0312d8434
In addition to the parts that were straightforward conversions, this
also:
logger.go
setup for go-kitlevel/format flags
stdout/stderr for output