mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-12-27 14:39:53 -08:00
Merge pull request #87 from prometheus/adjust-logging
Make logging of collector executions less verbose.
This commit is contained in:
commit
a9f5316bb3
|
@ -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())
|
||||
|
|
Loading…
Reference in a new issue