]> Cypherpunks.ru repositories - nncp.git/commitdiff
Print chunks sending progress
authorSergey Matveev <stargrave@stargrave.org>
Sat, 29 Apr 2017 06:43:09 +0000 (09:43 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sat, 29 Apr 2017 06:43:09 +0000 (09:43 +0300)
src/cypherpunks.ru/nncp/tx.go

index 2c9bd07ba790a6e91573e13566fb2af5e66b6086..7faef491cf0f279de5e239a7c77e9c32ee4e11d6 100644 (file)
@@ -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",