log: cleanup es client options

Signed-off-by: huanggze <loganhuang@yunify.com>
This commit is contained in:
huanggze
2019-09-29 16:18:47 +08:00
parent d2b1bf4ba0
commit 11854e3320
3 changed files with 15 additions and 37 deletions

View File

@@ -73,12 +73,10 @@ func NewLoggingClient(options *ElasticSearchOptions) (*ElasticSearchClient, erro
version = options.Version
}
if options.LogstashFormat {
if options.LogstashPrefix != "" {
index = options.LogstashPrefix
} else {
index = "logstash"
}
if options.IndexPrefix != "" {
index = options.IndexPrefix
} else {
index = "logstash"
}
switch version {