diff --git a/collector/pg_index.go b/collector/pg_index.go index b233ddeb..0db4f39a 100644 --- a/collector/pg_index.go +++ b/collector/pg_index.go @@ -18,7 +18,8 @@ import ( "fmt" "strings" - "github.com/go-kit/log" + "log/slog" + "github.com/prometheus/client_golang/prometheus" ) @@ -27,7 +28,7 @@ func init() { } type PGIndexCollector struct { - log log.Logger + log *slog.Logger } const pgIndexSubsystem = "index" diff --git a/collector/pg_stat_user_indexes.go b/collector/pg_stat_user_indexes.go index 29a315db..d0071603 100644 --- a/collector/pg_stat_user_indexes.go +++ b/collector/pg_stat_user_indexes.go @@ -18,9 +18,9 @@ import ( "fmt" "strings" + "log/slog" + "github.com/blang/semver/v4" - "github.com/go-kit/log" - "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" ) @@ -29,7 +29,7 @@ func init() { } type PGStatUserIndexesCollector struct { - log log.Logger + log *slog.Logger } const statUserIndexesSubsystem = "stat_user_indexes" @@ -137,7 +137,7 @@ func (c *PGStatUserIndexesCollector) Update(ctx context.Context, instance *insta } if lastIdxScanAvail && !lastIdxScan.Valid { - level.Debug(c.log).Log("msg", "Skipping collecting metric because it has no active_time") + c.log.Debug("Skipping collecting metric because it has no active_time") continue }