mirror of
https://github.com/ipfs/kubo.git
synced 2025-07-01 02:30:39 +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
|
||||
}
|
||||
|
||||
// TODO: include fs paths in output (will need a way to specify paths in underlying filearg system)
|
||||
added := make([]*Object, 0, len(req.Arguments()))
|
||||
for _, dagnode := range dagnodes {
|
||||
object, err := getOutput(dagnode)
|
||||
@ -92,6 +93,8 @@ func add(n *core.IpfsNode, readers []io.Reader) ([]*dag.Node, error) {
|
||||
|
||||
dagnodes := make([]*dag.Node, 0)
|
||||
|
||||
// TODO: allow adding directories (will need support for multiple files in filearg system)
|
||||
|
||||
for _, reader := range readers {
|
||||
node, err := importer.BuildDagFromReader(reader, n.DAG, mp, chunk.DefaultSplitter)
|
||||
if err != nil {
|
||||
|
@ -94,6 +94,7 @@ It outputs the key of the stored block.`,
|
||||
}
|
||||
|
||||
b := blocks.NewBlock(data)
|
||||
log.Debugf("BlockPut key: '%q'", b.Key())
|
||||
|
||||
k, err := n.Blocks.AddBlock(b)
|
||||
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])
|
||||
log.Info(s)
|
||||
res.SetOutput(&MessageOutput{s})
|
||||
},
|
||||
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>"},
|
||||
},
|
||||
Run: func(res cmds.Response, req cmds.Request) {
|
||||
log.Debug("Begin Publish")
|
||||
|
||||
n := req.Context().Node
|
||||
args := req.Arguments()
|
||||
|
||||
|
Reference in New Issue
Block a user