fedilogue/log.go
2021-01-17 04:17:15 +00:00

23 lines
563 B
Go

package main
import (
"log"
"os"
)
var (
logInfo *log.Logger
logWarn *log.Logger
logErr *log.Logger
logDebug *log.Logger
logFatal *log.Logger
)
func logInit() {
logInfo = log.New(os.Stderr, "INFO: ", log.Lmsgprefix|log.Ldate|log.Ltime)
logWarn = log.New(os.Stderr, "WARN: ", log.Lmsgprefix|log.Ldate|log.Ltime)
logErr = log.New(os.Stderr, "ERR: ", log.Lmsgprefix|log.Ldate|log.Ltime)
logFatal = log.New(os.Stderr, "FATAL: ", log.Lmsgprefix|log.Ldate|log.Ltime)
logDebug = log.New(os.Stderr, "DEBUG: ", log.Lmsgprefix|log.Ldate|log.Ltime)
}