Switch to prometheus/common/log for all logging

This commit is contained in:
Calle Pettersson
2018-04-05 07:27:26 +02:00
parent 63e51a554b
commit be5ac7b440
24 changed files with 56 additions and 71 deletions

View File

@@ -3,10 +3,9 @@
package collector
import (
"log"
"github.com/StackExchange/wmi"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/log"
)
func init() {
@@ -56,7 +55,7 @@ func NewNETFramework_NETCLRExceptionsCollector() (Collector, error) {
// to the provided prometheus Metric channel.
func (c *NETFramework_NETCLRExceptionsCollector) Collect(ch chan<- prometheus.Metric) error {
if desc, err := c.collect(ch); err != nil {
log.Println("[ERROR] failed collecting win32_perfrawdata_netframework_netclrexceptions metrics:", desc, err)
log.Error("failed collecting win32_perfrawdata_netframework_netclrexceptions metrics:", desc, err)
return err
}
return nil