-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsingle.go
65 lines (61 loc) · 1.55 KB
/
single.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
/*
-------------------------------------------------
Author : Zhang Fan
date: 2020/4/17
Description :
-------------------------------------------------
*/
package zlog
var defaultLog = func() *logWrap {
conf := DefaultConfig
conf.ShowInitInfo = false
return New(conf)
}()
func Log(level Level, v ...interface{}) {
defaultLog.print(level, "", v)
}
func Debug(v ...interface{}) {
defaultLog.print(DebugLevel, "", v)
}
func Info(v ...interface{}) {
defaultLog.print(InfoLevel, "", v)
}
func Warn(v ...interface{}) {
defaultLog.print(WarnLevel, "", v)
}
func Error(v ...interface{}) {
defaultLog.print(ErrorLevel, "", v)
}
func DPanic(v ...interface{}) {
defaultLog.print(DPanicLevel, "", v)
}
func Panic(v ...interface{}) {
defaultLog.print(PanicLevel, "", v)
}
func Fatal(v ...interface{}) {
defaultLog.print(FatalLevel, "", v)
}
func Logf(level Level, format string, v ...interface{}) {
defaultLog.print(level, format, v)
}
func Debugf(format string, v ...interface{}) {
defaultLog.print(DebugLevel, format, v)
}
func Infof(format string, v ...interface{}) {
defaultLog.print(InfoLevel, format, v)
}
func Warnf(format string, v ...interface{}) {
defaultLog.print(WarnLevel, format, v)
}
func Errorf(format string, v ...interface{}) {
defaultLog.print(ErrorLevel, format, v)
}
func DPanicf(format string, v ...interface{}) {
defaultLog.print(DPanicLevel, format, v)
}
func Panicf(format string, v ...interface{}) {
defaultLog.print(PanicLevel, format, v)
}
func Fatalf(format string, v ...interface{}) {
defaultLog.print(FatalLevel, format, v)
}