-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconsole.go
More file actions
32 lines (29 loc) · 727 Bytes
/
console.go
File metadata and controls
32 lines (29 loc) · 727 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 flog
const (
colorReset = "\033[0m"
colorBold = "\033[1m"
colorBlack = "\033[30m"
colorRed = "\033[31m"
colorGreen = "\033[32m"
colorYellow = "\033[33m"
colorBlue = "\033[34m"
colorMagenta = "\033[35m"
colorCyan = "\033[36m"
colorWhite = "\033[37m"
colorBlackHigh = "\033[90m"
)
const (
colorFatal = "\033[5;41;39m"
colorError = "\033[1;31m"
colorWarn = "\033[1;33m"
colorInfo = "\033[1;36m"
colorDebug = "\033[2;37m"
)
var levelConsoleMap = []string{
colorFatal + "FATAL" + colorReset,
colorError + "ERR" + colorReset,
colorWarn + "WRN" + colorReset,
colorInfo + "INF" + colorReset,
colorDebug + "DBG" + colorReset,
}
const SEG_LEN_LEVEL = 7 + 3 + 4