-
Notifications
You must be signed in to change notification settings - Fork 1
/
welfare.go
67 lines (55 loc) · 2.37 KB
/
welfare.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
58
59
60
61
62
63
64
65
66
67
package wzap
// WDebug logs debug level messages with default logger.
func WDebug(log string, msg string, args ...interface{}) {
Log(log).Debug(msg, args...)
}
// WDebugf logs debug level messages with default logger.
func WDebugf(log string, format string, args ...interface{}) {
Log(log).Debugf(format, args...)
}
// WInfo logs Info level messages with default logger in structured-style.
func WInfo(log string, msg string, args ...interface{}) {
Log(log).Info(msg, args...)
}
// WInfof logs Info level messages with default logger in structured-style.
func WInfof(log string, format string, args ...interface{}) {
Log(log).Infof(format, args...)
}
// WWarn logs Warn level messages with default logger in structured-style.
func WWarn(log string, msg string, args ...interface{}) {
Log(log).Warn(msg, args...)
}
// WWarnf logs Warn level messages with default logger in printf-style.
func WWarnf(log string, format string, args ...interface{}) {
Log(log).Warnf(format, args...)
}
// WError logs Error level messages with default logger in structured-style.
// Notice: additional stack will be added into messages.
func WError(log, msg string, args ...interface{}) {
Log(log).Error(msg, args...)
}
// WErrorf logs Error level messages with default logger in printf-style.
// Notice: additional stack will be added into messages.
func WErrorf(log, format string, args ...interface{}) {
Log(log).Errorf(format, args...)
}
// WPanic logs Panic level messages with default logger in structured-style.
// Notice: additional stack will be added into messages, meanwhile logger will panic.
func WPanic(log, msg string, args ...interface{}) {
Log(log).Panic(msg, args...)
}
// WPanicf logs Panicf level messages with default logger in printf-style.
// Notice: additional stack will be added into messages, meanwhile logger will panic.
func WPanicf(log, format string, args ...interface{}) {
Log(log).Panicf(format, args...)
}
// WFatal logs Fatal level messages with default logger in structured-style.
// Notice: additional stack will be added into messages, then calls os.Exit(1).
func WFatal(log, msg string, args ...interface{}) {
Log(log).Fatal(msg, args...)
}
// WFatalf logs Fatalf level messages with default logger in printf-style.
// Notice: additional stack will be added into messages, then calls os.Exit(1).
func WFatalf(log, format string, args ...interface{}) {
Log(log).Fatalf(format, args...)
}