summaryrefslogtreecommitdiff
path: root/toolkit/gocui/log.go
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/gocui/log.go')
-rw-r--r--toolkit/gocui/log.go17
1 files changed, 11 insertions, 6 deletions
diff --git a/toolkit/gocui/log.go b/toolkit/gocui/log.go
index e818814..baf57d9 100644
--- a/toolkit/gocui/log.go
+++ b/toolkit/gocui/log.go
@@ -1,9 +1,9 @@
package main
import (
- "fmt"
- "os"
- "strings"
+ "io"
+// "fmt"
+// "strings"
witlog "git.wit.org/wit/gui/log"
)
@@ -29,6 +29,7 @@ func exit(a ...any) {
witlog.Exit(a...)
}
+/*
func newLog(a ...any) {
s := fmt.Sprint(a...)
tmp := strings.Split(s, "\n")
@@ -44,8 +45,12 @@ func newLog(a ...any) {
}
}
}
+*/
-func setOutput(f *os.File) {
- witlog.SetOutput(f)
- witlog.SetToolkitOutput(newLog)
+func setOutput(w io.Writer) {
+ if (w == nil) {
+ return
+ }
+ witlog.SetOutput(w)
+ // witlog.SetToolkitOutput(newLog)
}