Commit a1d34365 authored by Matt Bell's avatar Matt Bell Committed by Juan Batiz-Benet

core/commands2: Restored logging that got removed

parent 91da11ae
...@@ -49,6 +49,7 @@ var addCmd = &cmds.Command{ ...@@ -49,6 +49,7 @@ var addCmd = &cmds.Command{
return return
} }
// TODO: include fs paths in output (will need a way to specify paths in underlying filearg system)
added := make([]*Object, 0, len(req.Arguments())) added := make([]*Object, 0, len(req.Arguments()))
for _, dagnode := range dagnodes { for _, dagnode := range dagnodes {
object, err := getOutput(dagnode) object, err := getOutput(dagnode)
...@@ -92,6 +93,8 @@ func add(n *core.IpfsNode, readers []io.Reader) ([]*dag.Node, error) { ...@@ -92,6 +93,8 @@ func add(n *core.IpfsNode, readers []io.Reader) ([]*dag.Node, error) {
dagnodes := make([]*dag.Node, 0) dagnodes := make([]*dag.Node, 0)
// TODO: allow adding directories (will need support for multiple files in filearg system)
for _, reader := range readers { for _, reader := range readers {
node, err := importer.BuildDagFromReader(reader, n.DAG, mp, chunk.DefaultSplitter) node, err := importer.BuildDagFromReader(reader, n.DAG, mp, chunk.DefaultSplitter)
if err != nil { if err != nil {
......
...@@ -94,6 +94,7 @@ It outputs the key of the stored block.`, ...@@ -94,6 +94,7 @@ It outputs the key of the stored block.`,
} }
b := blocks.NewBlock(data) b := blocks.NewBlock(data)
log.Debugf("BlockPut key: '%q'", b.Key())
k, err := n.Blocks.AddBlock(b) k, err := n.Blocks.AddBlock(b)
if err != nil { if err != nil {
......
...@@ -27,6 +27,7 @@ output of a running daemon. ...@@ -27,6 +27,7 @@ output of a running daemon.
} }
s := fmt.Sprintf("Changed log level of '%s' to '%s'", args[0], args[1]) s := fmt.Sprintf("Changed log level of '%s' to '%s'", args[0], args[1])
log.Info(s)
res.SetOutput(&MessageOutput{s}) res.SetOutput(&MessageOutput{s})
}, },
Marshallers: map[cmds.EncodingType]cmds.Marshaller{ Marshallers: map[cmds.EncodingType]cmds.Marshaller{
......
...@@ -39,6 +39,8 @@ Publish a <ref> to another public key: ...@@ -39,6 +39,8 @@ Publish a <ref> to another public key:
"IPFS path of the obejct to be published at <name>"}, "IPFS path of the obejct to be published at <name>"},
}, },
Run: func(res cmds.Response, req cmds.Request) { Run: func(res cmds.Response, req cmds.Request) {
log.Debug("Begin Publish")
n := req.Context().Node n := req.Context().Node
args := req.Arguments() args := req.Arguments()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment