diff --git a/README.md b/README.md index e4fcd1b..f4dd360 100644 --- a/README.md +++ b/README.md @@ -28,45 +28,6 @@ func main() { } ``` -### Emit structured logs to Elastic search using udpbeat - -**Add trace's document template to your ElasticSearch cluster** - -```shell -curl -XPUT 'http://localhost:9200/_template/trace' -d@udbbeat/template.json -``` - -**Start udpbeat UDP logs collector and emitter** - -```shell -go get github.com/gravitational/udpbeat -udpbeat -``` - -**Hook up logger to UDP collector** - -In your code, attach a logrus hook to use udpbeat: - -```golang - -import ( - "github.com/gravitational/trace" - log "github.com/sirupsen/logrus" -) - -func main() { - hook, err := trace.NewUDPHook() - if err != nil { - log.Fatalf(err) - } - log.SetHook(hook) -} -``` - -Done! You will get structured logs capturing output, log and error message. -You can edit `udpbeat/template.json` to modify emitted fields to whatever makes sense to your app. - -