From 69e6b0ea215cafca87afbc178b2002e2b68ece3c Mon Sep 17 00:00:00 2001 From: Nick Ethier Date: Thu, 29 Nov 2018 22:27:39 -0500 Subject: [PATCH] nomad: fix hclog usage --- command/agent/config.go | 4 ++-- nomad/leader.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/command/agent/config.go b/command/agent/config.go index 9c899d60b..6716ccc03 100644 --- a/command/agent/config.go +++ b/command/agent/config.go @@ -448,8 +448,8 @@ type Telemetry struct { // by the filter FilterDefault *bool `mapstructure:"filter_default"` - // DisableDispatchedJobSummaryMetrics allows for ignore dispatched jobs when - // publishing Job summary metrics. This is useful in environment that produce + // DisableDispatchedJobSummaryMetrics allows ignoring dispatched jobs when + // publishing Job summary metrics. This is useful in environments that produce // high numbers of single count dispatch jobs as the metrics for each take up // a small memory overhead. DisableDispatchedJobSummaryMetrics bool `mapstructure:"disable_dispatched_job_summary_metrics"` diff --git a/nomad/leader.go b/nomad/leader.go index 83faa99a1..f9aa35208 100644 --- a/nomad/leader.go +++ b/nomad/leader.go @@ -627,7 +627,7 @@ func (s *Server) publishJobSummaryMetrics(stopCh chan struct{}) { if s.config.DisableDispatchedJobSummaryMetrics { job, err := state.JobByID(ws, summary.Namespace, summary.JobID) if err != nil { - s.logger.Printf("[ERR] nomad: failed to lookup job for summary: %v", err) + s.logger.Error("error getting job for summary", "error", err) continue } if job.Dispatched {