-
Notifications
You must be signed in to change notification settings - Fork 5
/
noop_logger.go
58 lines (44 loc) · 1.24 KB
/
noop_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
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
package log
import "io"
// NoopLogger no operation Logger
type NoopLogger struct{}
// Fatal impl Logger Fatal
func (NoopLogger) Fatal(msg string, fields ...interface{}) {
}
// Error impl Logger Error
func (NoopLogger) Error(msg string, fields ...interface{}) {
}
// Warn impl Logger Warn
func (NoopLogger) Warn(msg string, fields ...interface{}) {
}
// Info impl Logger Info
func (NoopLogger) Info(msg string, fields ...interface{}) {
}
// Debug impl Logger Debug
func (NoopLogger) Debug(msg string, fields ...interface{}) {
}
// Output impl Logger Output
func (NoopLogger) Output(calldepth int, level Level, msg string, fields ...interface{}) {
}
// WithField impl Logger WithField
func (NoopLogger) WithField(key string, value interface{}) Logger {
return NoopLogger{}
}
// WithFields impl Logger WithFields
func (NoopLogger) WithFields(fields ...interface{}) Logger {
return NoopLogger{}
}
// SetFormatter impl Logger SetFormatter
func (NoopLogger) SetFormatter(Formatter) {
}
// SetOutput impl Logger SetOutput
func (NoopLogger) SetOutput(io.Writer) {
}
// SetLevel impl Logger SetLevel
func (NoopLogger) SetLevel(Level) error {
return nil
}
// SetLevelString impl Logger SetLevelString
func (NoopLogger) SetLevelString(string) error {
return nil
}