From 2a9724d7a89733db8c41571a8b5d9d0e1f0d76b3 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Mon, 8 Jan 2024 20:17:49 -0600 Subject: move to 'go.wit.com/log' Signed-off-by: Jeff Carr --- nocui/common.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'nocui/common.go') 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) } -- cgit v1.2.3