Use GoKit logger interface directly
This commit is contained in:
parent
3d9e6e2485
commit
8277ffc6be
1 changed files with 2 additions and 8 deletions
10
logger.go
10
logger.go
|
|
@ -6,17 +6,11 @@ import (
|
|||
"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 {
|
||||
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) {
|
||||
func SetLogger(l log.Logger) {
|
||||
logger = l
|
||||
}
|
||||
|
||||
// specify a default logger so that we don't end up with panics.
|
||||
var logger Logger = log.NewPrefixLogger(os.Stderr)
|
||||
var logger log.Logger = log.NewPrefixLogger(os.Stderr)
|
||||
|
|
|
|||
Loading…
Reference in a new issue