zk/util/logger.go
2020-12-27 19:07:57 +01:00

18 lines
434 B
Go

package util
// Logger can be used to report logging messages.
// The native log.Logger type implements this interface.
type Logger interface {
Printf(format string, v ...interface{})
Println(v ...interface{})
}
// NullLogger is a logger ignoring any input.
var NullLogger = nullLogger{}
type nullLogger struct{}
func (n *nullLogger) Printf(format string, v ...interface{}) {}
func (n *nullLogger) Println(v ...interface{}) {}