Logging update

This commit is contained in:
Jesse Malotaux 2025-04-11 17:49:28 +02:00
parent 541f016eaf
commit 2098aface9
13 changed files with 119 additions and 91 deletions

22
be/app/log.go Normal file
View file

@ -0,0 +1,22 @@
package app
import (
"fmt"
"log"
"os"
)
var logFile *os.File
func MCRMLogInit() {
var err error
logFile, err = os.OpenFile("log.txt", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666)
if err != nil {
log.Fatal(err)
}
}
func MCRMLog(v ...interface{}) {
log.Println(v...)
fmt.Fprintln(logFile, v...)
}