diff --git a/errors.go b/errors.go index 192916fd2..7996e1f5f 100644 --- a/errors.go +++ b/errors.go @@ -44,6 +44,12 @@ type Logger interface { Print(v ...interface{}) } +// NopLogger is a nop implementation of the Logger interface. +type NopLogger struct{} + +// Print implements Logger interface. +func (nl *NopLogger) Print(_ ...interface{}) {} + // SetLogger is used to set the default logger for critical errors. // The initial logger is os.Stderr. func SetLogger(logger Logger) error {