From e60674406899ac36940fa456141888d2d0069e43 Mon Sep 17 00:00:00 2001 From: Julius Volz Date: Mon, 22 Jun 2015 13:32:08 +0200 Subject: [PATCH] Make logging of collector executions less verbose. This fixes https://github.com/prometheus/node_exporter/issues/86 --- node_exporter.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node_exporter.go b/node_exporter.go index dcd6bb45..c15b4643 100644 --- a/node_exporter.go +++ b/node_exporter.go @@ -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())