-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlevel.go
More file actions
32 lines (27 loc) · 840 Bytes
/
level.go
File metadata and controls
32 lines (27 loc) · 840 Bytes
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
27
28
29
30
31
32
package logger
const (
INFO string = "INFO"
INIT = "INIT"
ERROR = "ERROR"
FATAL = "FATAL"
DEBUG = "DEBUG"
SUCCESS = "SUCCESS"
WARNING = "WARNING"
)
var DefaultLevels = map[string]Level{
INFO: Level{Name: INFO, Foreground: GREEN},
INIT: Level{Name: INIT, Foreground: BLUE, ForegroundHi: true},
WARNING: Level{Name: WARNING, Background: YELLOW, BackgroundHi: true},
ERROR: Level{Name: ERROR, Foreground: WHITE, Background: RED},
FATAL: Level{Name: FATAL, Foreground: WHITE, Background: RED, BackgroundHi: true},
SUCCESS: Level{Name: SUCCESS, Foreground: CYAN},
DEBUG: Level{Name: DEBUG, Background: YELLOW, BackgroundHi: true},
}
type Level struct {
Name string
Foreground Color
ForegroundHi bool
Background Color
BackgroundHi bool
Display bool
}