Initial commit

This commit is contained in:
Magnus Åhall 2023-08-19 09:30:59 +02:00
commit 6c071192e1
12 changed files with 709 additions and 0 deletions

23
log/pkg.go Normal file
View file

@ -0,0 +1,23 @@
package log
import (
// Standard
"bufio"
"fmt"
"os"
)
var (
logFile os.File
log *bufio.Writer
)
func init() {
logFile, _ := os.OpenFile("/tmp/launcher.log", os.O_APPEND | os.O_CREATE | os.O_WRONLY, 0644)
log = bufio.NewWriter(logFile)
}
func Print(format string, params ...interface{}) {
fmt.Fprintf(log, format+"\n", params...)
log.Flush()
}