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

Switch to slog #142

Merged
merged 1 commit into from
Sep 28, 2024
Merged

Switch to slog #142

merged 1 commit into from
Sep 28, 2024

Conversation

lucacome
Copy link
Contributor

@lucacome lucacome commented Sep 27, 2024

This pull request includes several updates to dependencies, configuration files, and logging mechanisms. The most important changes involve updating Go versions, adding a new linter, and replacing the logging library.

Dependency and configuration updates:

  • Updated Go version to 1.23 in .circleci/config.yml and .promu.yml.
  • Added sloglint to the list of enabled linters in .golangci.yml.
  • Updated github.com/prometheus dependencies to use the new slog logging, which cause the bump to 1.22 in go.mod.

Logging library replacement:

  • Replaced github.com/go-kit/log with log/slog across multiple files (main.go, systemd/resolved/resolved.go, systemd/systemd.go).

Code refactoring for logging:

  • Updated logging statements in main.go to use the new slog library, including changes in the func main() function.
  • Modified logging in systemd/resolved/resolved.go to use slog.Logger and updated error logging.
  • Updated logging in systemd/systemd.go to use slog.Logger and updated error logging.

Signed-off-by: Luca Comellini <[email protected]>
Copy link
Contributor

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

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

Thanks!

@SuperQ SuperQ merged commit 750bcf7 into prometheus-community:main Sep 28, 2024
4 checks passed
@lucacome lucacome deleted the slog branch September 28, 2024 01:04
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