diff --git a/cmd/main.go b/cmd/main.go index bd3d634..036e6cb 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -23,10 +23,12 @@ func main() { var dbDir string var size uint var sessionId string - var debug bool + var engineDebug bool + var stateDebug bool flag.StringVar(&sessionId, "session-id", "075xx2123", "session id") flag.StringVar(&dbDir, "dbdir", ".state", "database dir to read from") - flag.BoolVar(&debug, "d", false, "use engine debug output") + flag.BoolVar(&engineDebug, "engine-debug", false, "use engine debug output") + flag.BoolVar(&stateDebug, "state-debug", false, "use engine debug output") flag.UintVar(&size, "s", 160, "max size of output") flag.Parse() @@ -43,6 +45,10 @@ func main() { FlagCount: uint32(16), } + if stateDebug { + cfg.StateDebug = true + } + resourceDir := scriptDir menuStorageService := storage.NewMenuStorageService(dbDir, resourceDir) @@ -93,7 +99,7 @@ func main() { en := lhs.GetEngine() en = en.WithFirst(hl.Init) - if debug { + if engineDebug { en = en.WithDebug(nil) }