mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-08 05:56:37 +00:00
perfdata: fix incorrect collector log lines (#1626)
This commit is contained in:
@@ -228,14 +228,14 @@ func (p *Prometheus) execute(name string, c Collector, ctx *types.ScrapeContext,
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
p.logger.Error(fmt.Sprintf("collector %s failed after %s", name, p.maxScrapeDuration),
|
||||
p.logger.Error(fmt.Sprintf("collector %s failed after %s", name, duration),
|
||||
slog.Any("err", err),
|
||||
)
|
||||
|
||||
return failed
|
||||
}
|
||||
|
||||
p.logger.Error(fmt.Sprintf("collector %s succeeded after %s", name, p.maxScrapeDuration))
|
||||
p.logger.Info(fmt.Sprintf("collector %s succeeded after %s", name, duration))
|
||||
|
||||
return success
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user