kinesis-consumer/default_logger.go
Harlow Ward bde3e96ad9 Add Discard Logger
For situations where we don't want any logs produced by the application.

* Remove references to Logger from README
* Add implementation of DiscardLogger
2015-05-22 23:38:06 -07:00

21 lines
633 B
Go

package connector
import "log"
// DefaultLogger is an implementation for std lib logger.
type DefaultLogger struct{}
// Fatalf is equivalent to Printf() followed by a call to os.Exit(1).
func (l *DefaultLogger) Fatalf(format string, v ...interface{}) {
log.Fatalf(format, v...)
}
// Printf calls Output to print to the standard logger. Arguments are
// handled in the manner of fmt.Printf.
func (l *DefaultLogger) Printf(format string, v ...interface{}) {
log.Printf(format, v...)
}
// Make sure that there is a default logger instance initialized, so
// that we don't end up with panics.
var logger Logger = &DefaultLogger{}