mirror of
https://gitlab.com/ric_harvey/MailHog.git
synced 2024-12-02 18:54:04 +00:00
33 lines
472 B
Go
33 lines
472 B
Go
package levels
|
|
|
|
type LogLevel int
|
|
|
|
const (
|
|
FATAL LogLevel = iota
|
|
ERROR
|
|
INFO
|
|
WARN
|
|
DEBUG
|
|
TRACE
|
|
INHERIT
|
|
)
|
|
|
|
var StringToLogLevels = map[string]LogLevel{
|
|
"TRACE": TRACE,
|
|
"DEBUG": DEBUG,
|
|
"WARN": WARN,
|
|
"INFO": INFO,
|
|
"ERROR": ERROR,
|
|
"FATAL": FATAL,
|
|
"INHERIT": INHERIT,
|
|
}
|
|
|
|
var LogLevelsToString = map[LogLevel]string{
|
|
TRACE: "TRACE",
|
|
DEBUG: "DEBUG",
|
|
WARN: "WARN",
|
|
INFO: "INFO",
|
|
ERROR: "ERROR",
|
|
FATAL: "FATAL",
|
|
INHERIT: "INHERIT",
|
|
}
|