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:
Steve Brunton
2017-11-29 22:42:59 -05:00
committed by GitHub
parent 13b50a6b7c
commit be3ca4608c
7 changed files with 58 additions and 165 deletions

View File

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