To allow for different logging endpoints we'll introduce a Logger interface that will be passed into the pipeline during initialization. * Add Logger interface * Use logger interface in pipeline and emitters
8 lines
299 B
Go
8 lines
299 B
Go
package connector
|
|
|
|
// 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 {
|
|
Fatalf(format string, v ...interface{})
|
|
Printf(format string, v ...interface{})
|
|
}
|