mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-03-03 09:06:35 +00:00
Switch to prometheus/common/log for all logging
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
package collector
|
||||
|
||||
import (
|
||||
"log"
|
||||
"strings"
|
||||
|
||||
"github.com/StackExchange/wmi"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/common/log"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -57,7 +57,7 @@ func NewCPUCollector() (Collector, error) {
|
||||
// to the provided prometheus Metric channel.
|
||||
func (c *CPUCollector) Collect(ch chan<- prometheus.Metric) error {
|
||||
if desc, err := c.collect(ch); err != nil {
|
||||
log.Println("[ERROR] failed collecting cpu metrics:", desc, err)
|
||||
log.Error("failed collecting cpu metrics:", desc, err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user