commit fa401bad34f73b85d36290243abf8b53051fb54d
parent f76b61018ff96e5d2ce5971752eb3f3cc69176a8
Author: lash <dev@holbrook.no>
Date: Sat, 15 Mar 2025 02:51:25 +0000
Reinstate engine debug
Diffstat:
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/engine/config.go b/engine/config.go
@@ -20,6 +20,8 @@ type Config struct {
Language string
// StateDebug activates string translations of flags in output logs if set
StateDebug bool
+ // EngineDebug activates the engine debug output
+ EngineDebug bool
// MenuSeparator sets the string to use for separating menu selectors and menu descriptors in the renderer
MenuSeparator string
// ResetOnEmptyInput purges cache and restart state execution at root on empty input
diff --git a/engine/db.go b/engine/db.go
@@ -48,6 +48,9 @@ func NewEngine(cfg Config, rs resource.Resource) *DefaultEngine {
if en.cfg.Root == "" {
en.cfg.Root = "root"
}
+ if en.cfg.EngineDebug {
+ en.cfg.StateDebug = true
+ }
return en
}