Update Logging instructions
This commit is contained in:
parent
cd54569c61
commit
e17988cfc9
1 changed files with 5 additions and 17 deletions
20
README.md
20
README.md
|
|
@ -28,34 +28,22 @@ Get the package source:
|
||||||
|
|
||||||
$ go get github.com/harlow/kinesis-connectors
|
$ go get github.com/harlow/kinesis-connectors
|
||||||
|
|
||||||
Import the `go-kinesis` and `kinesis-connector` packages:
|
|
||||||
|
|
||||||
```go
|
|
||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/harlow/kinesis-connectors"
|
|
||||||
"github.com/sendgridlabs/go-kinesis"
|
|
||||||
)
|
|
||||||
```
|
|
||||||
|
|
||||||
### Example Pipelines
|
### Example Pipelines
|
||||||
|
|
||||||
Examples pipelines are proviede in [examples directory][example].
|
Examples pipelines are proviede in [examples directory][example].
|
||||||
|
|
||||||
[example]: https://github.com/harlow/kinesis-connectors/tree/master/examples
|
[example]: https://github.com/harlow/kinesis-connectors/tree/master/examples
|
||||||
|
|
||||||
### Logger
|
### Logging
|
||||||
|
|
||||||
Default logging is handled by Package log. An application can override the defualt package logging by
|
Default logging is handled by [go-kit package log](https://github.com/go-kit/kit/tree/master/log).
|
||||||
changing it's `logger` variable:
|
|
||||||
|
Applications can override the default loging behaviour by implementing the [Logger interface][log_interface].
|
||||||
|
|
||||||
```go
|
```go
|
||||||
connector.SetLogger(NewCustomLogger())
|
connector.SetLogger(NewCustomLogger())
|
||||||
```
|
```
|
||||||
|
|
||||||
The customer logger must implement the [Logger interface][log_interface].
|
|
||||||
|
|
||||||
[log_interface]: https://github.com/harlow/kinesis-connectors/blob/master/logger.go
|
[log_interface]: https://github.com/harlow/kinesis-connectors/blob/master/logger.go
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue