-
Notifications
You must be signed in to change notification settings - Fork 7
/
log_interface.go
49 lines (42 loc) · 1.06 KB
/
log_interface.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
package log
// Won't compile if LogInterface can't be realized by a log.Logger
var (
_ StdLog = Default
_ LogInterface = Default
)
// StdLog is interface for builtin log
type StdLog interface {
Print(...interface{})
Printf(string, ...interface{})
Println(...interface{})
Fatal(...interface{})
Fatalf(string, ...interface{})
Fatalln(...interface{})
Panic(...interface{})
Panicf(string, ...interface{})
Panicln(...interface{})
}
// LogInterface is interface for this logger
type LogInterface interface {
Debug(...interface{})
Info(...interface{})
Print(...interface{})
Warn(...interface{})
Error(...interface{})
Panic(...interface{})
Fatal(...interface{})
Debugln(...interface{})
Infoln(...interface{})
Println(...interface{})
Warnln(...interface{})
Errorln(...interface{})
Panicln(...interface{})
Fatalln(...interface{})
Debugf(string, ...interface{})
Infof(string, ...interface{})
Printf(string, ...interface{})
Warnf(string, ...interface{})
Errorf(string, ...interface{})
Panicf(string, ...interface{})
Fatalf(string, ...interface{})
}