mirror of https://github.com/grpc/grpc-go.git
xds/internal: Replace calls to `Debugf` with `V(2)` checks and `Infof` (#7180)
This commit is contained in:
parent
796c61536a
commit
c7c8aa8f53
|
|
@ -115,7 +115,9 @@ type priorityBalancer struct {
|
|||
}
|
||||
|
||||
func (b *priorityBalancer) UpdateClientConnState(s balancer.ClientConnState) error {
|
||||
b.logger.Debugf("Received an update with balancer config: %+v", pretty.ToJSON(s.BalancerConfig))
|
||||
if b.logger.V(2) {
|
||||
b.logger.Infof("Received an update with balancer config: %+v", pretty.ToJSON(s.BalancerConfig))
|
||||
}
|
||||
newConfig, ok := s.BalancerConfig.(*LBConfig)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected balancer config with type: %T", s.BalancerConfig)
|
||||
|
|
|
|||
|
|
@ -482,7 +482,9 @@ func (a *authority) watchResource(rType xdsresource.Type, resourceName string, w
|
|||
|
||||
// If we have a cached copy of the resource, notify the new watcher.
|
||||
if state.cache != nil {
|
||||
a.logger.Debugf("Resource type %q with resource name %q found in cache: %s", rType.TypeName(), resourceName, state.cache.ToJSON())
|
||||
if a.logger.V(2) {
|
||||
a.logger.Infof("Resource type %q with resource name %q found in cache: %s", rType.TypeName(), resourceName, state.cache.ToJSON())
|
||||
}
|
||||
resource := state.cache
|
||||
a.serializer.Schedule(func(context.Context) { watcher.OnUpdate(resource) })
|
||||
}
|
||||
|
|
|
|||
|
|
@ -568,6 +568,8 @@ func newConfigFromContents(data []byte) (*Config, error) {
|
|||
node.ClientFeatures = append(node.ClientFeatures, clientFeatureNoOverprovisioning, clientFeatureResourceWrapper)
|
||||
config.NodeProto = node
|
||||
|
||||
logger.Debugf("Bootstrap config for creating xds-client: %v", pretty.ToJSON(config))
|
||||
if logger.V(2) {
|
||||
logger.Infof("Bootstrap config for creating xds-client: %v", pretty.ToJSON(config))
|
||||
}
|
||||
return config, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue