kinesis-consumer/discard_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

15 lines
472 B
Go

package connector
import "os"
// DiscardLogger is the an implementation of a Logger that does not
// send any output. It can be used in scenarios when logging is not desired.
type DiscardLogger struct{}
// Fatalf is equivalent to Printf() followed by a call to os.Exit(1).
func (l *DiscardLogger) Fatalf(format string, v ...interface{}) {
os.Exit(1)
}
// Printf is noop and does not have any output.
func (l *DiscardLogger) Printf(format string, v ...interface{}) {}