smegmesh/pkg/log/log.go

23 lines
444 B
Go
Raw Normal View History

2023-09-28 17:55:37 +02:00
package logging
/*
* This package creates the info, warning and error loggers.
*/
import (
"log"
"os"
)
var (
InfoLog *log.Logger
WarningLog *log.Logger
ErrorLog *log.Logger
)
func init() {
InfoLog = log.New(os.Stdout, "INFO: ", log.Ldate|log.Ltime|log.Lshortfile)
WarningLog = log.New(os.Stdout, "WARNING: ", log.Ldate|log.Ltime|log.Lshortfile)
ErrorLog = log.New(os.Stderr, "ERROR: ", log.Ldate|log.Ltime|log.Lshortfile)
}