Let suture logging bubble upwards

This commit is contained in:
Jakob Borg
2015-07-11 10:52:57 +10:00
parent d16b04b683
commit 1b837116e6
7 changed files with 50 additions and 31 deletions

View File

@@ -107,13 +107,7 @@ var (
// for file data without altering the local folder in any way.
func NewModel(cfg *config.Wrapper, id protocol.DeviceID, deviceName, clientName, clientVersion string, ldb *leveldb.DB) *Model {
m := &Model{
Supervisor: suture.New("model", suture.Spec{
Log: func(line string) {
if debug {
l.Debugln(line)
}
},
}),
Supervisor: suture.NewSimple("model"),
cfg: cfg,
db: ldb,
finder: db.NewBlockFinder(ldb, cfg),