-
Notifications
You must be signed in to change notification settings - Fork 1
/
const.go
57 lines (52 loc) · 1.01 KB
/
const.go
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package QLog
//默认值
const (
_DATEFORMAT = "2006-01-02" //默认文件日期格式
DEFAULTFILENAME = "info" //默认文件前缀
DEFAULTFILEPATH = "./" //默认文件存放路径
DEFAULTFILESUFFIX = "log" //默认文件后缀
DEFAULTFILEMAXSIZE = 2 << 29 //默认单个文件最大1G
callDep = 3 //默认深度
)
const (
ALL uint8 = iota
DEBUG
INFO
WARN
ERROR
FATAL
ALERT
OFF
)
// alert level
const (
ALERTALERT = "notice" // notice
ALERTWARNING = "warning" // 严重
ALERTCRITICAL = "critical" // 紧急
)
const (
DIAGONAL = "/"
COLON = ":"
BLANK = " "
NEWLINE = "\n"
DOT = "."
UNDERSCODE = "_"
DASH = "-"
)
const (
TYPEDEBUG = "DEBUG"
TYPEINFO = "INFO"
TYPEWARN = "WARN"
TYPEERROR = "ERROR"
TYPEFATAL = "FATAL"
TYPEALERT = "ALERT"
)
const COLOR_TPL = "\x1b[%dm%s\x1b[0m"
const (
COLOR_RED = uint8(iota + 91)
COLOR_GREEN
COLOR_YELLOW
COLOR_BLUE
COLOR_MAGENTA //洋红
COLOR_INTENSITY
)