summaryrefslogtreecommitdiffhomepage
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go16
1 files changed, 14 insertions, 2 deletions
diff --git a/main.go b/main.go
index 370311e99..5d8eb4350 100644
--- a/main.go
+++ b/main.go
@@ -1,11 +1,23 @@
/*
Copyright © 2025 NAME HERE <EMAIL ADDRESS>
-
*/
package main
-import "github.com/kujtimiihoxha/termai/cmd"
+import (
+ "log"
+ "os"
+
+ "github.com/kujtimiihoxha/termai/cmd"
+)
func main() {
+ // Create a log file and make that the log output
+ logfile, err := os.OpenFile("debug.log", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0o666)
+ if err != nil {
+ panic(err)
+ }
+
+ log.SetOutput(logfile)
+
cmd.Execute()
}