kinesis-consumer/logger.go

23 lines
580 B
Go
Raw Normal View History

package connector
import (
"os"
2015-05-26 04:51:53 +00:00
"github.com/go-kit/kit/log"
)
// Logger sends pipeline info and errors to logging endpoint. The logger could be
// used to send to STDOUT, Syslog, or any number of distributed log collecting platforms.
type Logger interface {
2015-05-26 04:51:53 +00:00
Log(keyvals ...interface{}) error
}
// SetLogger adds the ability to change the logger so that external packages
// can control the logging for this package
func SetLogger(l Logger) {
logger = l
}
2015-05-26 04:51:53 +00:00
// specify a default logger so that we don't end up with panics.
var logger Logger = log.NewPrefixLogger(os.Stderr)