mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
28 lines
343 B
Go
28 lines
343 B
Go
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"
|
|
}
|
|
}
|