mirror of
https://github.com/prometheus-community/windows_exporter
synced 2025-02-16 20:17:10 +00:00
ad: fix log call
This commit is contained in:
parent
80f1cf0546
commit
3cfc11c6d2
@ -3,9 +3,10 @@
|
|||||||
package collector
|
package collector
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"log"
|
||||||
|
|
||||||
"github.com/StackExchange/wmi"
|
"github.com/StackExchange/wmi"
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
"github.com/prometheus/common/log"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@ -454,7 +455,7 @@ func NewADCollector() (Collector, error) {
|
|||||||
// to the provided prometheus Metric channel.
|
// to the provided prometheus Metric channel.
|
||||||
func (c *ADCollector) Collect(ch chan<- prometheus.Metric) error {
|
func (c *ADCollector) Collect(ch chan<- prometheus.Metric) error {
|
||||||
if desc, err := c.collect(ch); err != nil {
|
if desc, err := c.collect(ch); err != nil {
|
||||||
log.Errorf("[ERROR] failed collecting ad metrics:", desc, err)
|
log.Println("[ERROR] failed collecting ad metrics:", desc, err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user