forked from zalando/skipper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlogger.go
43 lines (31 loc) · 1.34 KB
/
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
package logging
import "github.com/sirupsen/logrus"
// DefaultLog provides a default implementation of the Logger interface.
type DefaultLog struct{}
// Logger instances provide custom logging.
type Logger interface {
// Log with level ERROR
Error(...interface{})
// Log formatted messages with level ERROR
Errorf(string, ...interface{})
// Log with level WARN
Warn(...interface{})
// Log formatted messages with level WARN
Warnf(string, ...interface{})
// Log with level INFO
Info(...interface{})
// Log formatted messages with level INFO
Infof(string, ...interface{})
// Log with level DEBUG
Debug(...interface{})
// Log formatted messages with level DEBUG
Debugf(string, ...interface{})
}
func (dl *DefaultLog) Error(a ...interface{}) { logrus.Error(a...) }
func (dl *DefaultLog) Errorf(f string, a ...interface{}) { logrus.Errorf(f, a...) }
func (dl *DefaultLog) Warn(a ...interface{}) { logrus.Warn(a...) }
func (dl *DefaultLog) Warnf(f string, a ...interface{}) { logrus.Warnf(f, a...) }
func (dl *DefaultLog) Info(a ...interface{}) { logrus.Info(a...) }
func (dl *DefaultLog) Infof(f string, a ...interface{}) { logrus.Infof(f, a...) }
func (dl *DefaultLog) Debug(a ...interface{}) { logrus.Debug(a...) }
func (dl *DefaultLog) Debugf(f string, a ...interface{}) { logrus.Debugf(f, a...) }