k3s/vendor/github.com/canonical/go-dqlite/internal/logging/level.go

28 lines
343 B
Go
Raw Normal View History

2019-11-08 21:45:10 +00:00
package logging
// Level defines the logging level.
type Level int
// Available logging levels.
const (
Debug Level = iota
Info
Warn
Error
)
func (l Level) String() string {
switch l {
case Debug:
return "DEBUG"
case Info:
return "INFO"
case Warn:
return "WARN"
case Error:
return "ERROR"
default:
return "UNKNOWN"
}
}