From edb1c52dee08d36a1ab7031647d94068f2c93533 Mon Sep 17 00:00:00 2001 From: DennisMao Date: Wed, 2 Jan 2019 17:01:46 +0800 Subject: [PATCH] fix function changes --- logs/es/es.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/logs/es/es.go b/logs/es/es.go index 9c0b830d..9d6a615c 100644 --- a/logs/es/es.go +++ b/logs/es/es.go @@ -8,8 +8,8 @@ import ( "net/url" "time" - "github.com/astaxie/beego/logs" "github.com/OwnLocal/goes" + "github.com/astaxie/beego/logs" ) // NewES return a LoggerInterface @@ -21,7 +21,7 @@ func NewES() logs.Logger { } type esLogger struct { - *goes.Connection + *goes.Client DSN string `json:"dsn"` Level int `json:"level"` } @@ -41,8 +41,8 @@ func (el *esLogger) Init(jsonconfig string) error { } else if host, port, err := net.SplitHostPort(u.Host); err != nil { return err } else { - conn := goes.NewConnection(host, port) - el.Connection = conn + conn := goes.NewClient(host, port) + el.Client = conn } return nil } @@ -78,3 +78,4 @@ func (el *esLogger) Flush() { func init() { logs.Register(logs.AdapterEs, NewES) } +