Switch logging from glog to github.com/prometheus/log.

This commit is contained in:
Julius Volz 2015-05-28 21:21:44 +02:00
commit e65bc868fc
13 changed files with 36 additions and 44 deletions

View file

@ -3,8 +3,8 @@
package collector
import (
"github.com/golang/glog"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/log"
"github.com/soundcloud/go-runit/runit"
)
@ -66,11 +66,11 @@ func (c *runitCollector) Update(ch chan<- prometheus.Metric) error {
for _, service := range services {
status, err := service.Status()
if err != nil {
glog.V(1).Infof("Couldn't get status for %s: %s, skipping...", service.Name, err)
log.Debugf("Couldn't get status for %s: %s, skipping...", service.Name, err)
continue
}
glog.V(1).Infof("%s is %d on pid %d for %d seconds", service.Name, status.State, status.Pid, status.Duration)
log.Debugf("%s is %d on pid %d for %d seconds", service.Name, status.State, status.Pid, status.Duration)
c.state.WithLabelValues(service.Name).Set(float64(status.State))
c.stateDesired.WithLabelValues(service.Name).Set(float64(status.Want))
if status.NormallyUp {