From 9d9e23cc44f67f784714e5d1823dcdccd0baa12c Mon Sep 17 00:00:00 2001 From: Chris Piraino Date: Thu, 14 May 2020 14:52:29 -0500 Subject: [PATCH] Add service id context to the proxycfg logger This is especially useful when multiple proxies are all querying the same Consul agent. --- agent/proxycfg/manager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/proxycfg/manager.go b/agent/proxycfg/manager.go index 41dd77361e..7d8163f924 100644 --- a/agent/proxycfg/manager.go +++ b/agent/proxycfg/manager.go @@ -188,7 +188,7 @@ func (m *Manager) ensureProxyServiceLocked(ns *structs.NodeService, token string } // Set the necessary dependencies - state.logger = m.Logger + state.logger = m.Logger.With("service_id", sid.String()) state.cache = m.Cache state.source = m.Source state.dnsConfig = m.DNSConfig