aboutsummaryrefslogtreecommitdiff
path: root/level.go
blob: 1d8e2b52ed6c75f9033dd4121e8a79d7c4857855 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package logger

type Level int

const (
	NoLevel Level = 0
	Debug   Level = 1
	Info    Level = 2
	Warn    Level = 3
	Error   Level = 4
)

func (lvl Level) String() string {
	switch lvl {
	case 1:
		return "debug"
	case 2:
		return "info"
	case 3:
		return "warn"
	case 4:
		return "error"
	default:
		return "unknown"
	}
}