Skip to content

Commit e53d28f

Browse files
authored
xdsclient: log node ID with verbosity INFO (#5860)
1 parent 9373e5c commit e53d28f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

xds/internal/xdsclient/singleton.go

+5
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ func newRefCountedWithConfig(config *bootstrap.Config) (XDSClient, error) {
9090
singletonClient.clientImpl = c
9191
singletonClient.refCount++
9292
singletonClientImplCreateHook()
93+
nodeID := "<unknown>"
94+
if node, ok := config.XDSServer.NodeProto.(interface{ GetId() string }); ok {
95+
nodeID = node.GetId()
96+
}
97+
logger.Infof("xDS node ID: %s", nodeID)
9398
return &onceClosingClient{XDSClient: singletonClient}, nil
9499
}
95100

0 commit comments

Comments
 (0)