diff options
Diffstat (limited to 'nocui/common.go')
| -rw-r--r-- | nocui/common.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/nocui/common.go b/nocui/common.go index 077055e..ff3e4bb 100644 --- a/nocui/common.go +++ b/nocui/common.go @@ -12,6 +12,7 @@ package main */ import ( + "go.wit.com/log" "go.wit.com/gui/widget" ) @@ -87,7 +88,7 @@ func (n *node) findWidgetId(id int) *node { func (n *node) doUserEvent() { if (callback == nil) { - log(logError, "doUserEvent() callback == nil", n.WidgetId) + log.Log(ERROR, "doUserEvent() callback == nil", n.WidgetId) return } var a widget.Action @@ -98,9 +99,9 @@ func (n *node) doUserEvent() { a.I = n.I a.B = n.B a.ActionType = widget.User - log(logInfo, "doUserEvent() START: send a user event to the callback channel") + log.Log(INFO, "doUserEvent() START: send a user event to the callback channel") callback <- a - log(logInfo, "doUserEvent() END: sent a user event to the callback channel") + log.Log(INFO, "doUserEvent() END: sent a user event to the callback channel") return } @@ -130,12 +131,12 @@ func addNode(a *widget.Action) *node { // n.tk = new(guiWidget) if (a.WidgetType == widget.Root) { - log(logInfo, "addNode() Root") + log.Log(INFO, "addNode() Root") return n } if (me.rootNode.findWidgetId(a.WidgetId) != nil) { - log(logError, "addNode() WidgetId already exists", a.WidgetId) + log.Log(ERROR, "addNode() WidgetId already exists", a.WidgetId) return me.rootNode.findWidgetId(a.WidgetId) } |
