-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlogging.go
30 lines (25 loc) · 890 Bytes
/
logging.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
// note this package is just a shell package. implementations should
// replace Logger with something other than nullLog to format log output.
package vorlage
type Loggert interface {
Errorf(format string, args ...interface{})
Infof(format string, args ...interface{})
Noticef(format string, args ...interface{})
Warnf(format string, args ...interface{})
Debugf(format string, args ...interface{})
Alertf(format string, args ...interface{})
}
var Logger Loggert = nullLog{}
type nullLog struct{}
func (n nullLog) Noticef(format string, args ...interface{}) {
}
func (n nullLog) Warnf(format string, args ...interface{}) {
}
func (n nullLog) Errorf(format string, args ...interface{}) {
}
func (n nullLog) Infof(format string, args ...interface{}) {
}
func (n nullLog) Debugf(format string, args ...interface{}) {
}
func (n nullLog) Alertf(format string, args ...interface{}) {
}