bilibili-backup/library/log/level.go
2019-04-22 02:59:20 +00:00

30 lines
483 B
Go

package log
// Level of severity.
type Level int
// Verbose is a boolean type that implements Info, Infov (like Printf) etc.
type Verbose bool
// common log level.
const (
_debugLevel Level = iota
_infoLevel
_warnLevel
_errorLevel
_fatalLevel
)
var levelNames = [...]string{
_debugLevel: "DEBUG",
_infoLevel: "INFO",
_warnLevel: "WARN",
_errorLevel: "ERROR",
_fatalLevel: "FATAL",
}
// String implementation.
func (l Level) String() string {
return levelNames[l]
}