Make logging of collector executions less verbose.

This fixes https://github.com/prometheus/node_exporter/issues/86
This commit is contained in:
Julius Volz 2015-06-22 13:32:08 +02:00
parent 484eedbf01
commit e606744068
1 changed files with 2 additions and 2 deletions

View File

@ -94,10 +94,10 @@ func Execute(name string, c collector.Collector, ch chan<- prometheus.Metric) {
var result string
if err != nil {
log.Infof("ERROR: %s failed after %fs: %s", name, duration.Seconds(), err)
log.Errorf("ERROR: %s collector failed after %fs: %s", name, duration.Seconds(), err)
result = "error"
} else {
log.Infof("OK: %s success after %fs.", name, duration.Seconds())
log.Debugf("OK: %s collector succeeded after %fs.", name, duration.Seconds())
result = "success"
}
scrapeDurations.WithLabelValues(name, result).Observe(duration.Seconds())