From e53d28f5eb19a6816d4bb5c3db1b793ac2ba3e49 Mon Sep 17 00:00:00 2001 From: Mohan Li <67390330+mohanli-ml@users.noreply.github.com> Date: Wed, 14 Dec 2022 09:05:38 -0800 Subject: [PATCH] xdsclient: log node ID with verbosity INFO (#5860) --- xds/internal/xdsclient/singleton.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xds/internal/xdsclient/singleton.go b/xds/internal/xdsclient/singleton.go index c07dd4323f76..408a27cf6279 100644 --- a/xds/internal/xdsclient/singleton.go +++ b/xds/internal/xdsclient/singleton.go @@ -90,6 +90,11 @@ func newRefCountedWithConfig(config *bootstrap.Config) (XDSClient, error) { singletonClient.clientImpl = c singletonClient.refCount++ singletonClientImplCreateHook() + nodeID := "" + if node, ok := config.XDSServer.NodeProto.(interface{ GetId() string }); ok { + nodeID = node.GetId() + } + logger.Infof("xDS node ID: %s", nodeID) return &onceClosingClient{XDSClient: singletonClient}, nil }