update logging (#5)
* removed Zap logging and switched to logrus * "deprecating" the prometheus.go file and fixed up logging stuff on a couple more files. * removed uber zap from glide * well that sure messed things up
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/common/log"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
const namespace = "mikrotik"
|
||||
@@ -32,9 +32,9 @@ type deviceCollector struct {
|
||||
func NewDeviceCollector(cfg Config) (*deviceCollector, error) {
|
||||
devices := make([]Device, len(cfg.Devices))
|
||||
|
||||
cfg.Logger.Info("setting up collector for devices",
|
||||
"numDevices", len(cfg.Devices),
|
||||
)
|
||||
log.WithFields(log.Fields{
|
||||
"numDevices": len(cfg.Devices),
|
||||
}).Info("setting up collector for devices")
|
||||
|
||||
copy(devices, cfg.Devices)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user