From 13002738994f1730d92e5bce60bdf00cbefe9907 Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Thu, 27 Jan 2022 21:19:43 +0100 Subject: [PATCH] feat(integrations): logs --- backend/services/integrations/integration/elasticsearch.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/services/integrations/integration/elasticsearch.go b/backend/services/integrations/integration/elasticsearch.go index 33a14340a..aa58f621b 100644 --- a/backend/services/integrations/integration/elasticsearch.go +++ b/backend/services/integrations/integration/elasticsearch.go @@ -106,7 +106,7 @@ func (es *elasticsearch) Request(c *client) error { if err := json.NewEncoder(&buf).Encode(query); err != nil { return fmt.Errorf("Error encoding the query: %s", err) } - + log.Print("looking for logs") res, err := esC.Search( esC.Search.WithContext(context.Background()), esC.Search.WithIndex(es.Indexes), @@ -115,6 +115,7 @@ func (es *elasticsearch) Request(c *client) error { esC.Search.WithBody(&buf), esC.Search.WithSort("timestamp:asc"), ) + log.Print("after looking for logs") if err != nil { return fmt.Errorf("Error getting response: %s", err) } @@ -131,7 +132,7 @@ func (es *elasticsearch) Request(c *client) error { ) } } - + log.Print("no errors while looking for logs") for { var esResp elasticResponce if err := json.NewDecoder(res.Body).Decode(&esResp); err != nil {