github.com/deanMdreon/kafka-go@v0.4.32/logger.go (about) 1 package kafka 2 3 // Logger interface API for log.Logger 4 type Logger interface { 5 Printf(string, ...interface{}) 6 } 7 8 // LoggerFunc is a bridge between Logger and any third party logger 9 // Usage: 10 // l := NewLogger() // some logger 11 // r := kafka.NewReader(kafka.ReaderConfig{ 12 // Logger: kafka.LoggerFunc(l.Infof), 13 // ErrorLogger: kafka.LoggerFunc(l.Errorf), 14 // }) 15 type LoggerFunc func(string, ...interface{}) 16 17 func (f LoggerFunc) Printf(msg string, args ...interface{}) { f(msg, args...) }