diff options
Diffstat (limited to 'andlabs/main.go')
| -rw-r--r-- | andlabs/main.go | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/andlabs/main.go b/andlabs/main.go index b9109b9..c735aea 100644 --- a/andlabs/main.go +++ b/andlabs/main.go @@ -2,6 +2,7 @@ package main import ( "sync" + "go.wit.com/log" "go.wit.com/gui/widget" "github.com/andlabs/ui" @@ -14,30 +15,30 @@ var uiMain sync.Once var muAction sync.Mutex func catchActionChannel() { - log(logInfo, "catchActionChannel() START") + log.Log(INFO, "catchActionChannel() START") for { - log(logInfo, "catchActionChannel() for loop") + log.Log(INFO, "catchActionChannel() for loop") select { case a := <-pluginChan: - log(logInfo, "catchActionChannel() SELECT widget id =", a.WidgetId, a.Name) - log(logInfo, "catchActionChannel() STUFF", a.WidgetId, a.ActionType, a.WidgetType) + log.Log(INFO, "catchActionChannel() SELECT widget id =", a.WidgetId, a.Name) + log.Log(INFO, "catchActionChannel() STUFF", a.WidgetId, a.ActionType, a.WidgetType) muAction.Lock() // TODO ui.QueueMain(f) // TODO ui.QueueMain( func() {rawAction(a)} ) ui.QueueMain( func() {rawAction(&a)} ) // rawAction(a) muAction.Unlock() - log(logInfo, "catchActionChannel() STUFF END", a.WidgetId, a.ActionType, a.WidgetType) + log.Log(INFO, "catchActionChannel() STUFF END", a.WidgetId, a.ActionType, a.WidgetType) } } } // This is important. This sets the defaults for the gui. Without this, there isn't correct padding, etc func init() { - log(logNow, "Init() START") - log(debugToolkit, "Init()") + log.Log(INFO, "Init() START") + log.Log(INFO, "Init()") // Can you pass values to a plugin init() ? Otherwise, there is no way to safely print - // log(debugToolkit, "init() Setting defaultBehavior = true") + // log.Log(INFO, "init() Setting defaultBehavior = true") setDefaultBehavior(true) @@ -51,7 +52,7 @@ func init() { // andlabs = make(map[int]*andlabsT) pluginChan = make(chan widget.Action, 1) - log(logNow, "Init() start channel reciever") + log.Log(INFO, "Init() start channel reciever") go catchActionChannel() - log(logNow, "Init() END") + log.Log(INFO, "Init() END") } |
