log for etcd

pull/236/head
skiffer-git 2 years ago
parent f1b5f56294
commit 9443ed5d49

@ -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