summaryrefslogtreecommitdiff
path: root/gocui/debug.go
diff options
context:
space:
mode:
Diffstat (limited to 'gocui/debug.go')
-rw-r--r--gocui/debug.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/gocui/debug.go b/gocui/debug.go
index 9d41d90..8c70dd3 100644
--- a/gocui/debug.go
+++ b/gocui/debug.go
@@ -2,6 +2,7 @@ package main
import (
"fmt"
+ "go.wit.com/log"
"go.wit.com/gui/widget"
)
@@ -10,7 +11,7 @@ func (n *node) dumpTree(draw bool) {
if (w == nil) {
return
}
- n.showWidgetPlacement(logNow, "dumpTree()")
+ n.showWidgetPlacement(true, "dumpTree()")
for _, child := range n.children {
child.dumpTree(draw)
@@ -19,7 +20,7 @@ func (n *node) dumpTree(draw bool) {
func (n *node) showWidgetPlacement(b bool, s string) {
if (n == nil) {
- log(logError, "WTF w == nil")
+ log.Log(ERROR, "WTF w == nil")
return
}
w := n.tk
@@ -27,7 +28,7 @@ func (n *node) showWidgetPlacement(b bool, s string) {
var s1 string
var pId int
if (n.parent == nil) {
- log(logVerbose, "showWidgetPlacement() parent == nil", n.WidgetId, w.cuiName)
+ log.Log(INFO, "showWidgetPlacement() parent == nil", n.WidgetId, w.cuiName)
pId = 0
} else {
pId = n.parent.WidgetId
@@ -46,11 +47,11 @@ func (n *node) showWidgetPlacement(b bool, s string) {
}
}
tmp := "." + n.Name + "."
- log(b, s1, s, n.WidgetType, ",", tmp) // , "text=", w.text)
+ log.Log(INFO, s1, s, n.WidgetType, ",", tmp) // , "text=", w.text)
}
func (n *node) dumpWidget(pad string) {
- log(true, "node:", pad, n.WidgetId, "At(", n.AtW, n.AtH, ") ,", n.WidgetType, ", n.Name =", n.Name, ", n.Text =", n.Text)
+ log.Log(NOW, "node:", pad, n.WidgetId, "At(", n.AtW, n.AtH, ") ,", n.WidgetType, ", n.Name =", n.Name, ", n.Text =", n.Text)
}
func (n *node) listWidgets() {