Commit ce223eef authored by Jeromy's avatar Jeromy

some small cleanup of logging

parent 3ed10b13
......@@ -82,7 +82,7 @@ func addDir(n *core.IpfsNode, fpath string, depth int, out io.Writer) (*dag.Node
}
}
log.Info("adding dir: %s", fpath)
log.Infof("adding dir: %s", fpath)
return tree, addNode(n, tree, fpath, out)
}
......@@ -98,10 +98,10 @@ func addFile(n *core.IpfsNode, fpath string, depth int, out io.Writer) (*dag.Nod
return nil, err
}
log.Info("adding file: %s", fpath)
log.Infof("adding file: %s", fpath)
for _, l := range root.Links {
log.Info("adding subblock: %s %s", l.Name, l.Hash.B58String())
log.Infof("adding subblock: '%s' %s", l.Name, l.Hash.B58String())
}
k, err := root.Key()
......
......@@ -18,7 +18,7 @@ type DagReader struct {
serv mdag.DAGService
node *mdag.Node
position int
buf *bytes.Buffer
buf io.Reader
}
// NewDagReader creates a new reader object that reads the data represented by the given
......@@ -71,8 +71,13 @@ func (dr *DagReader) precalcNextBuf() error {
return ft.ErrInvalidDirLocation
case ftpb.Data_File:
//TODO: this *should* work, needs testing first
//return NewDagReader(nxt, dr.serv)
panic("Not yet handling different layers of indirection!")
log.Warning("Running untested code for multilayered indirect FS reads.")
subr, err := NewDagReader(nxt, dr.serv)
if err != nil {
return err
}
dr.buf = subr
return nil
case ftpb.Data_Raw:
dr.buf = bytes.NewBuffer(pb.GetData())
return nil
......
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