diff --git a/search/document_store.go b/search/document_store.go index 9a6fb1c3518e6be0c9e8a3c1b6e5eff47b831548..80b7e61a7e15ac972b68cc6f1776a04d3a4d5444 100644 --- a/search/document_store.go +++ b/search/document_store.go @@ -81,7 +81,6 @@ func (w *Writer) NewDocumentStore(name string, tmpl interface{}) (DocumentStore, if err != nil { return ds, errors.Wrapf(err, "failed to marshal index mappings") } - logs.Info("%s Index Mappings: %s", structType, string(ds.jsonMappings)) w.documentStoreByName[name] = ds return ds, nil @@ -188,7 +187,6 @@ func (ds *DocumentStore) Search(query Query, limit int64) (res *SearchResponseHi } bodyData, _ := ioutil.ReadAll(searchResponse.Body) - logs.Info("Response Body: %s", string(bodyData)) var response SearchResponseBody err = json.Unmarshal(bodyData, &response) @@ -225,7 +223,6 @@ func (ds *DocumentStore) Get(id string) (res *GetResponseBody, err error) { } bodyData, _ := ioutil.ReadAll(getResponse.Body) - logs.Info("Get Response Body: %s", string(bodyData)) var response GetResponseBody err = json.Unmarshal(bodyData, &response) diff --git a/search/time_series.go b/search/time_series.go index b6cb0d3422bdccfb92e2a9e22bec55a364a87f7a..271615307023966d74759654f62b8ef5b208cf4d 100644 --- a/search/time_series.go +++ b/search/time_series.go @@ -97,7 +97,6 @@ func (w *Writer) NewTimeSeries(name string, tmpl interface{}) (TimeSeries, error if err != nil { return ts, errors.Wrapf(err, "failed to marshal index mappings") } - logs.Info("%s Index Mappings: %s", structType, string(ts.jsonMappings)) w.timeSeriesByName[name] = ts return ts, nil @@ -126,7 +125,6 @@ func structMappingProperties(structType reflect.Type) (map[string]MappingPropert fieldName = jsonTags[0] } if fieldName == "" { - logs.Info("skip %s unnamed field %+v", structType, structField) continue } @@ -387,7 +385,6 @@ func (ts *TimeSeries) Search(query Query, sort []map[string]string, limit int64, } jsonBody, _ := json.Marshal(body) - logs.Info("Search: %s", string(jsonBody)) search := opensearchapi.SearchRequest{ Index: []string{ts.name + "-*"}, @@ -412,7 +409,6 @@ func (ts *TimeSeries) Search(query Query, sort []map[string]string, limit int64, } bodyData, _ := ioutil.ReadAll(searchResponse.Body) - logs.Info("Response Body: %s", string(bodyData)) var response SearchResponseBody err = json.Unmarshal(bodyData, &response) @@ -453,7 +449,6 @@ func (ts *TimeSeries) Get(id string) (res *GetResponseBody, err error) { } bodyData, _ := ioutil.ReadAll(getResponse.Body) - logs.Info("Get Response Body: %s", string(bodyData)) var response GetResponseBody err = json.Unmarshal(bodyData, &response) diff --git a/search/writer.go b/search/writer.go index 72f9d24ce05e6182ea7c3b02a588ee843974fdab..d3c2a5f719c50b5e48574a8073dcf0897eb8b07f 100644 --- a/search/writer.go +++ b/search/writer.go @@ -45,10 +45,9 @@ func New(config Config) (Writer, error) { var err error w.client, err = opensearch.NewClient(searchConfig) if err != nil { + logs.Info("cannot initialize opensearch connection for config: %+v", searchConfig) return w, errors.Wrapf(err, "cannot initialize opensearch connection") } - // Print OpenSearch version information on console. - logs.Info("Search client created with config: %+v", searchConfig) w.api = opensearchapi.New(w.client)