From 86dfeceb0eceb9882064afc9041bb0f73f342c0f Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sat, 29 Apr 2017 09:43:09 +0300 Subject: [PATCH] Print chunks sending progress --- src/cypherpunks.ru/nncp/tx.go | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) 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", -- 2.48.1