log for etcd

pull/455/head
skiffer-git 3 years ago committed by Xinwei Xiong(cubxxw-openim)
parent 9d2a2804ab
commit f71d9b95c1

@ -83,9 +83,9 @@ func RegisterEtcd(schema, etcdAddr, myHost string, myPort int, serviceName strin
select {
case pv, ok := <-kresp:
if ok == true {
log.Debug(operationID, "KeepAlive kresp ok", pv)
log.Debug(operationID, "KeepAlive kresp ok", pv, args)
} else {
log.Error(operationID, "KeepAlive kresp failed", pv)
log.Error(operationID, "KeepAlive kresp failed ", pv, args)
t := time.NewTicker(time.Duration(ttl/2) * time.Second)
for {
select {
@ -94,7 +94,7 @@ func RegisterEtcd(schema, etcdAddr, myHost string, myPort int, serviceName strin
ctx, _ := context.WithCancel(context.Background())
resp, err := cli.Grant(ctx, int64(ttl))
if err != nil {
log.Error(operationID, "Grant failed ", err.Error())
log.Error(operationID, "Grant failed ", err.Error(), args)
continue
}

Loading…
Cancel
Save