api/server/logger_release.go

21 lines
292 B
Go
Raw Permalink Normal View History

2018-05-14 14:19:29 +02:00
// +build !cgo
package main
import (
"os"
"git.fuyu.moe/Fuyu/flog"
)
func setLogger() {
f, err := os.OpenFile(`log`, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0644)
if err != nil {
panic(err)
}
flog.Output = f
flog.MinLevel = flog.LevelInfo
flog.MinStackLevel = flog.LevelWarning
}