xdsclient: log node ID with verbosity INFO (#5860)

This commit is contained in:
Mohan Li 2022-12-14 09:05:38 -08:00 committed by GitHub
parent 9373e5cb26
commit e53d28f5eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -90,6 +90,11 @@ func newRefCountedWithConfig(config *bootstrap.Config) (XDSClient, error) {
singletonClient.clientImpl = c
singletonClient.refCount++
singletonClientImplCreateHook()
nodeID := "<unknown>"
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
}