From b27f692194872c1e519bfcc007812d216e68d5a8 Mon Sep 17 00:00:00 2001 From: mohanli-ml Date: Tue, 13 Dec 2022 00:51:18 +0000 Subject: [PATCH 1/3] Log xDS bootstrap with verbosity INFO --- xds/internal/xdsclient/singleton.go | 1 + 1 file changed, 1 insertion(+) diff --git a/xds/internal/xdsclient/singleton.go b/xds/internal/xdsclient/singleton.go index c07dd4323f7..6fb700fd9e1 100644 --- a/xds/internal/xdsclient/singleton.go +++ b/xds/internal/xdsclient/singleton.go @@ -90,6 +90,7 @@ func newRefCountedWithConfig(config *bootstrap.Config) (XDSClient, error) { singletonClient.clientImpl = c singletonClient.refCount++ singletonClientImplCreateHook() + logger.Info("xDS bootstrap: %s", c.BootstrapConfig().XDSServer.NodeProto.String()) return &onceClosingClient{XDSClient: singletonClient}, nil } From 07e5f9dd39ccdfd5a68adc17b1e1498844600d9b Mon Sep 17 00:00:00 2001 From: mohanli-ml Date: Tue, 13 Dec 2022 19:31:51 +0000 Subject: [PATCH 2/3] xdsclient: log node ID with verbosity INFO --- xds/internal/xdsclient/singleton.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xds/internal/xdsclient/singleton.go b/xds/internal/xdsclient/singleton.go index 6fb700fd9e1..b7cba2bb296 100644 --- a/xds/internal/xdsclient/singleton.go +++ b/xds/internal/xdsclient/singleton.go @@ -90,7 +90,11 @@ func newRefCountedWithConfig(config *bootstrap.Config) (XDSClient, error) { singletonClient.clientImpl = c singletonClient.refCount++ singletonClientImplCreateHook() - logger.Info("xDS bootstrap: %s", c.BootstrapConfig().XDSServer.NodeProto.String()) + nodeID := "" + if id, ok := config.XDSServer.NodeProto.(interface{ GetId() string }); ok { + nodeID = id.GetId() + } + logger.Infof("xDS node ID: %s", nodeID) return &onceClosingClient{XDSClient: singletonClient}, nil } From fa57833c90845b78bf2b63a1f746205a1b0166f7 Mon Sep 17 00:00:00 2001 From: mohanli-ml Date: Tue, 13 Dec 2022 19:56:30 +0000 Subject: [PATCH 3/3] xdsclient: log node ID with verbosity INFO --- xds/internal/xdsclient/singleton.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xds/internal/xdsclient/singleton.go b/xds/internal/xdsclient/singleton.go index b7cba2bb296..408a27cf627 100644 --- a/xds/internal/xdsclient/singleton.go +++ b/xds/internal/xdsclient/singleton.go @@ -91,8 +91,8 @@ func newRefCountedWithConfig(config *bootstrap.Config) (XDSClient, error) { singletonClient.refCount++ singletonClientImplCreateHook() nodeID := "" - if id, ok := config.XDSServer.NodeProto.(interface{ GetId() string }); ok { - nodeID = id.GetId() + 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