This repository has been archived by the owner on Nov 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flag.go
55 lines (38 loc) · 1.52 KB
/
flag.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
package xlog
// Flag holds single or multiple flags of Log.
// An Output instance uses these flags which are stored by Flag type.
type Flag int
const (
// FlagDate prints the date in the local time zone: 2009/01/23
FlagDate Flag = 1 << iota
// FlagTime prints the time in the local time zone: 01:23:23
FlagTime
// FlagMicroseconds prints microsecond resolution: 01:23:23.123123
FlagMicroseconds
// FlagUTC uses UTC rather than the local time zone
FlagUTC
// FlagSeverity prints severity level
FlagSeverity
// FlagPadding prints padding with multiple lines
FlagPadding
// FlagLongFunc prints full package name and function name: a/b/c/d.Func1()
FlagLongFunc
// FlagShortFunc prints final package name and function name: d.Func1()
FlagShortFunc
// FlagLongFile prints full file name and line number: a/b/c/d.go:23
FlagLongFile
// FlagShortFile prints final file name element and line number: d.go:23
FlagShortFile
// FlagFields prints fields if there are
FlagFields
// FlagStackTrace prints the stack trace if there is
FlagStackTrace
// FlagErfStackTrace prints the stack trace of the erf error if there is the erf error
FlagErfStackTrace
// FlagErfMessage prints the message of the erf error while printing the erf stack trace
FlagErfMessage
// FlagErfFields prints fields of the erf error while printing the erf stack trace
FlagErfFields
// FlagDefault holds initial flags for the Logger
FlagDefault = FlagDate | FlagTime | FlagSeverity | FlagPadding | FlagFields | FlagStackTrace | FlagErfStackTrace
)