registry/etcd: fix logging nil pointer dereference (#1889)
* registry/etcd: fix logging nil pointer dereference * Fix stupid mistake * Fix merge
This commit is contained in:
parent
d2cea4b7b7
commit
31ed4aa0e8
@ -301,10 +301,10 @@ func (e *etcdRegistry) registerNode(s *registry.Service, node *registry.Node, op
|
||||
putOpts = append(putOpts, clientv3.WithLease(lgr.ID))
|
||||
|
||||
if logger.V(logger.TraceLevel, logger.DefaultLogger) {
|
||||
logger.Tracef("Registering %s id %s without lease", service.Name, node.Id)
|
||||
logger.Tracef("Registering %s id %s with lease %v and leaseID %v and ttl %v", service.Name, node.Id, lgr, lgr.ID, options.TTL)
|
||||
}
|
||||
} else if logger.V(logger.TraceLevel, logger.DefaultLogger) {
|
||||
logger.Tracef("Registering %s id %s with lease %v and leaseID %v and ttl %v", service.Name, node.Id, lgr, lgr.ID, options.TTL)
|
||||
logger.Tracef("Registering %s id %s without lease", service.Name, node.Id)
|
||||
}
|
||||
|
||||
key := nodePath(options.Domain, s.Name, node.Id)
|
||||
|
Loading…
x
Reference in New Issue
Block a user