ad: fix log call

This commit is contained in:
Martin Lindhe 2017-08-10 03:36:28 +02:00
parent 80f1cf0546
commit 3cfc11c6d2

View File

@ -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