summaryrefslogtreecommitdiff
path: root/info.go
blob: b390062fa6255007bb01a158f41d55e39567872e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package log

import 	(
	"os"
	golanglog "log"
)

func Info(a ...any) {
	golanglog.Println(a...)
}

// start writing all the logging to a tmp file
func SetTmp() {
	f, err := os.OpenFile("/tmp/guilogfile", os.O_RDWR | os.O_CREATE | os.O_APPEND, 0666)
	if err != nil {
		golanglog.Fatalf("error opening file: %v", err)
	}
	// hmm. is there a trick here or must this be in main()
	// defer f.Close()

	golanglog.SetOutput(f)
	golanglog.Println("This is a test log entry")
}