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

Update logging #3097

Merged
merged 1 commit into from
Sep 11, 2024
Merged

Update logging #3097

merged 1 commit into from
Sep 11, 2024

Conversation

SuperQ
Copy link
Member

@SuperQ SuperQ commented Aug 29, 2024

Switch from promlog/go-kit to promslog/slog for logging.

@SuperQ
Copy link
Member Author

SuperQ commented Sep 10, 2024

👓 @tjhop

Copy link
Contributor

@tjhop tjhop left a comment

Choose a reason for hiding this comment

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

Looks great to me (aside from the comment about the test fixtures, and the build updates -- unsure if we'd rather separate those bits).

Can we also enable the sloglint linter in golanci-lint? It's disabled by default:

enable:
- depguard
- misspell
- revive

collector/fixtures/e2e-64k-page-output.txt Outdated Show resolved Hide resolved
@@ -130,7 +128,7 @@ func (h *handler) innerHandler(filters ...string) (http.Handler, error) {
handler = promhttp.HandlerFor(
prometheus.Gatherers{h.exporterMetricsRegistry, r},
promhttp.HandlerOpts{
ErrorLog: stdlog.New(log.NewStdlibAdapter(level.Error(h.logger)), "", 0),
ErrorLog: slog.NewLogLogger(h.logger.Handler(), slog.LevelError),
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Switch from promlog/go-kit to promslog/slog for logging.
* Update Go build to 1.23.

Signed-off-by: Ben Kochie <superq@gmail.com>
@SuperQ SuperQ merged commit 0909576 into master Sep 11, 2024
8 checks passed
@SuperQ SuperQ deleted the superq/promslog branch September 11, 2024 08:51
rexagod added a commit to rexagod/node_exporter that referenced this pull request Sep 22, 2024
Sync dependencies and log using the machinery introduced in prometheus#3097.

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
rexagod added a commit to rexagod/node_exporter that referenced this pull request Sep 22, 2024
Sync dependencies and log using the machinery introduced in prometheus#3097.

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
rexagod added a commit to rexagod/node_exporter that referenced this pull request Sep 22, 2024
Sync dependencies and log using the machinery introduced in prometheus#3097.

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
rexagod added a commit to rexagod/node_exporter that referenced this pull request Sep 22, 2024
Sync dependencies and log using the machinery introduced in prometheus#3097.

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
rexagod added a commit to rexagod/node_exporter that referenced this pull request Sep 22, 2024
Log using the machinery introduced in prometheus#3097.

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
SuperQ pushed a commit that referenced this pull request Sep 22, 2024
Log using the machinery introduced in #3097.

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
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