From: Sergey Matveev Date: Sat, 29 Apr 2017 06:43:09 +0000 (+0300) Subject: Print chunks sending progress X-Git-Tag: 0.7^2~20 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=86dfeceb0eceb9882064afc9041bb0f73f342c0f;p=nncp.git Print chunks sending progress --- diff --git a/src/cypherpunks.ru/nncp/tx.go b/src/cypherpunks.ru/nncp/tx.go index 2c9bd07..7faef49 100644 --- a/src/cypherpunks.ru/nncp/tx.go +++ b/src/cypherpunks.ru/nncp/tx.go @@ -258,7 +258,7 @@ func (ctx *Ctx) TxFileChunked(node *Node, nice uint8, srcPath, dstPath string, m io.TeeReader(reader, hsh), ) if err == nil { - ctx.LogD("tx", SDS{ + ctx.LogI("tx", SDS{ "type": "file", "node": node.Id, "nice": strconv.Itoa(int(nice)), @@ -298,7 +298,7 @@ func (ctx *Ctx) TxFileChunked(node *Node, nice uint8, srcPath, dstPath string, m metaPktSize := int64(metaBuf.Len()) _, err = ctx.Tx(node, pkt, nice, metaPktSize, minSize, &metaBuf) if err == nil { - ctx.LogD("tx", SDS{ + ctx.LogI("tx", SDS{ "type": "file", "node": node.Id, "nice": strconv.Itoa(int(nice)), @@ -306,14 +306,6 @@ func (ctx *Ctx) TxFileChunked(node *Node, nice uint8, srcPath, dstPath string, m "dst": path, "size": strconv.FormatInt(metaPktSize, 10), }, "sent") - ctx.LogI("tx", SDS{ - "type": "file", - "node": node.Id, - "nice": strconv.Itoa(int(nice)), - "src": srcPath, - "dst": dstPath, - "size": strconv.FormatInt(fileSize, 10), - }, "sent") } else { ctx.LogE("tx", SDS{ "type": "file",