-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmethod.go
More file actions
68 lines (55 loc) · 1.42 KB
/
method.go
File metadata and controls
68 lines (55 loc) · 1.42 KB
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
58
59
60
61
62
63
64
65
66
67
68
package log
// Panic without custom Fields.
func Panic(v ...interface{}) {
Fields{}.print(fPanic, 1, v)
}
// Fatal without custom Fields.
func Fatal(v ...interface{}) {
Fields{}.print(fFatal, 1, v)
}
// Error without custom Fields.
func Error(v ...interface{}) {
Fields{}.print(fError, 1, v)
}
// Warn without custom Fields.
func Warn(v ...interface{}) {
Fields{}.print(fWarn, 1, v)
}
// Info without custom Fields.
func Info(v ...interface{}) {
Fields{}.print(fInfo, 1, v)
}
// Debug without custom Fields.
func Debug(v ...interface{}) {
Fields{}.print(fDebug, 1, v)
}
// Panicf without custom Fields.
func Panicf(format string, v ...interface{}) {
Fields{}.printf(fPanic, 1, format, v)
}
// Fatalf without custom Fields.
func Fatalf(format string, v ...interface{}) {
Fields{}.printf(fFatal, 1, format, v)
}
// Errorf without custom Fields.
func Errorf(format string, v ...interface{}) {
Fields{}.printf(fError, 1, format, v)
}
// Warnf without custom Fields.
func Warnf(format string, v ...interface{}) {
Fields{}.printf(fWarn, 1, format, v)
}
// Infof without custom Fields.
func Infof(format string, v ...interface{}) {
Fields{}.printf(fInfo, 1, format, v)
}
// Debugf without custom Fields.
func Debugf(format string, v ...interface{}) {
Fields{}.printf(fDebug, 1, format, v)
}
// CheckFatal calls Fatal(err) if err != nil.
func CheckFatal(err error) {
if err != nil {
Fields{}.print(fFatal, 1, []interface{}{err})
}
}