-
Notifications
You must be signed in to change notification settings - Fork 0
/
logger.go
28 lines (22 loc) · 837 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
package epplib
import "fmt"
// Logger hold all logging functions needed.
type Logger interface {
Debugf(string, ...interface{})
Errorf(string, ...interface{})
Infof(string, ...interface{})
}
// DummyLogger for the logger interface used for testing.
type DummyLogger struct{}
// Errorf for DummyLogger fmt.Printf the information.
func (*DummyLogger) Errorf(format string, args ...interface{}) {
fmt.Printf(format, args...) //nolint:forbidigo // dummy logger
}
// Infof for DummyLogger fmt.Printf the information.
func (*DummyLogger) Infof(format string, args ...interface{}) {
fmt.Printf(format, args...) //nolint:forbidigo // dummy logger
}
// Debugf for DummyLogger fmt.Printf the information.
func (*DummyLogger) Debugf(format string, args ...interface{}) {
fmt.Printf(format, args...) //nolint:forbidigo // dummy logger
}