// NewLog returns a new instance of Log func NewLog() *Log { path, err := ioutil.TempDir("", "tsm1-test") if err != nil { panic(err) } l := &Log{Log: tsm1.NewLog(path)} l.Log.IndexWriter = &l.IndexWriter l.LoggingEnabled = true return l }
func NewWAL() *Log { dir, err := ioutil.TempDir("", "tsm1-test") if err != nil { panic("couldn't get temp dir") } l := &Log{ Log: tsm1.NewLog(dir), path: dir, } l.LoggingEnabled = true return l }