From cf4059f3ce57b5b507f55bc8b48871c62d9dad8c Mon Sep 17 00:00:00 2001 From: cskh Date: Fri, 2 Jun 2023 09:37:44 -0400 Subject: [PATCH] chore: fix the error message format (#17554) --- agent/agent.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agent/agent.go b/agent/agent.go index 388c7c3e6f..678d110d53 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -4571,13 +4571,13 @@ func (a *Agent) persistServerMetadata() { f, err := consul.OpenServerMetadata(file) if err != nil { - a.logger.Error("failed to open existing server metadata: %w", err) + a.logger.Error("failed to open existing server metadata", "error", err) continue } if err := consul.WriteServerMetadata(f); err != nil { f.Close() - a.logger.Error("failed to write server metadata: %w", err) + a.logger.Error("failed to write server metadata", "error", err) continue }