mirror of
https://github.com/ipfs/kubo.git
synced 2025-07-01 19:24:14 +08:00
core/commands2: Restored logging that got removed
This commit is contained in:

committed by
Juan Batiz-Benet

parent
91da11ae66
commit
a1d34365e4
@ -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) {
|
|||||||
|
|
||||||
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.`,
|
|||||||
}
|
}
|
||||||
|
|
||||||
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.
|
|||||||
}
|
}
|
||||||
|
|
||||||
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:
|
|||||||
"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()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user