You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
335 B
Go
18 lines
335 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
"os"
|
|
)
|
|
|
|
type Log struct {
|
|
Info log.Logger
|
|
Warn log.Logger
|
|
Error log.Logger
|
|
}
|
|
var logger Log = Log{
|
|
Info: *log.New(os.Stdout, "[INFO]\t", log.Ltime|log.Lshortfile),
|
|
Warn: *log.New(os.Stderr, "[WARN]\t", log.Ltime|log.Lshortfile),
|
|
Error: *log.New(os.Stderr, "[ERROR]\t", log.Ltime|log.Lshortfile),
|
|
}
|