@cryptotaxi247 / kubo / commits / a1d34365e

core/commands2: Restored logging that got removed

Matt Bell committed Nov 9, 2014 at 18:37 UTC a1d34365e43468383c5c18187730e4dfeee5d0a5
4 files changed +7
core/commands2/add.go
+3
@@ -49,6 +49,7 @@ var addCmd = &cmds.Command{
49 return
50 }
51
52 + // TODO: include fs paths in output (will need a way to specify paths in underlying filearg system)
53 added := make([]*Object, 0, len(req.Arguments()))
54 for _, dagnode := range dagnodes {
55 object, err := getOutput(dagnode)
@@ -92,6 +93,8 @@ func add(n *core.IpfsNode, readers []io.Reader) ([]*dag.Node, error) {
93
94 dagnodes := make([]*dag.Node, 0)
95
96 + // TODO: allow adding directories (will need support for multiple files in filearg system)
97 +
98 for _, reader := range readers {
99 node, err := importer.BuildDagFromReader(reader, n.DAG, mp, chunk.DefaultSplitter)
100 if err != nil {
core/commands2/block.go
+1
@@ -94,6 +94,7 @@ It outputs the key of the stored block.`,
94 }
95
96 b := blocks.NewBlock(data)
97 + log.Debugf("BlockPut key: '%q'", b.Key())
98
99 k, err := n.Blocks.AddBlock(b)
100 if err != nil {
core/commands2/log.go
+1
@@ -27,6 +27,7 @@ output of a running daemon.
27 }
28
29 s := fmt.Sprintf("Changed log level of '%s' to '%s'", args[0], args[1])
30 + log.Info(s)
31 res.SetOutput(&MessageOutput{s})
32 },
33 Marshallers: map[cmds.EncodingType]cmds.Marshaller{
core/commands2/publish.go
+2
@@ -39,6 +39,8 @@ Publish a <ref> to another public key:
39 "IPFS path of the obejct to be published at <name>"},
40 },
41 Run: func(res cmds.Response, req cmds.Request) {
42 + log.Debug("Begin Publish")
43 +
44 n := req.Context().Node
45 args := req.Arguments()
46