From 5a57da53beffee67cf73067e420e2d5faa2e0c96 Mon Sep 17 00:00:00 2001 From: Ben Reedy Date: Sat, 12 Jun 2021 11:52:40 +1000 Subject: [PATCH] Replace deprecated log lib in remaining collectors Some collectors were missed when migrating to the local github.com/prometheus-community/windows_exporter/log library. Signed-off-by: Ben Reedy --- collector/cache.go | 2 +- collector/cpu_info.go | 2 +- collector/os.go | 2 +- tools/collector-generator/collector.template | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/collector/cache.go b/collector/cache.go index efe8670e..cf9d8cd9 100644 --- a/collector/cache.go +++ b/collector/cache.go @@ -3,8 +3,8 @@ package collector import ( + "github.com/prometheus-community/windows_exporter/log" "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/common/log" ) func init() { diff --git a/collector/cpu_info.go b/collector/cpu_info.go index 502fd3aa..aedec7c1 100644 --- a/collector/cpu_info.go +++ b/collector/cpu_info.go @@ -8,8 +8,8 @@ import ( "strings" "github.com/StackExchange/wmi" + "github.com/prometheus-community/windows_exporter/log" "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/common/log" ) func init() { diff --git a/collector/os.go b/collector/os.go index 67e01ec6..ba72666f 100644 --- a/collector/os.go +++ b/collector/os.go @@ -11,8 +11,8 @@ import ( "github.com/prometheus-community/windows_exporter/headers/netapi32" "github.com/prometheus-community/windows_exporter/headers/psapi" "github.com/prometheus-community/windows_exporter/headers/sysinfoapi" + "github.com/prometheus-community/windows_exporter/log" "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/common/log" "golang.org/x/sys/windows/registry" ) diff --git a/tools/collector-generator/collector.template b/tools/collector-generator/collector.template index 97a717ec..8e6685da 100644 --- a/tools/collector-generator/collector.template +++ b/tools/collector-generator/collector.template @@ -2,7 +2,7 @@ package collector import ( "github.com/StackExchange/wmi" "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/common/log" + "github.com/prometheus-community/windows_exporter/log" ) func init() { registerCollector("{{ .CollectorName | toLower }}", new{{ .CollectorName }}Collector) // TODO: Add any perflib dependencies here