-
Notifications
You must be signed in to change notification settings - Fork 0
/
logger.go
32 lines (25 loc) · 818 Bytes
/
logger.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
package log
// Logger logger interface
type Logger interface {
Debugf(format string, args ...interface{})
Infof(format string, args ...interface{})
Warnf(format string, args ...interface{})
Errorf(format string, args ...interface{})
Fatalf(format string, args ...interface{})
Panicf(format string, args ...interface{})
}
// NullLogger An empty Logger type, print nothing.
type NullLogger struct {
}
func (nl NullLogger) Debugf(format string, args ...interface{}) {
}
func (nl NullLogger) Infof(format string, args ...interface{}) {
}
func (nl NullLogger) Warnf(format string, args ...interface{}) {
}
func (nl NullLogger) Errorf(format string, args ...interface{}) {
}
func (nl NullLogger) Fatalf(format string, args ...interface{}) {
}
func (nl NullLogger) Panicf(format string, args ...interface{}) {
}