Skip to content

Commit

Permalink
refactor(api): add log info on post /events
Browse files Browse the repository at this point in the history
Signed-off-by: francois  samin <[email protected]>
  • Loading branch information
fsamin committed Jan 18, 2022
1 parent 801419c commit e834a00
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions engine/api/event/elasticsearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ func PushInElasticSearch(ctx context.Context, db gorp.SqlExecutor, store cache.S
continue
}
e.Payload = nil
log.Info(ctx, "sending event %q to %s services", e.EventType, sdk.TypeElasticsearch)
_, code, errD := services.NewClient(db, esServices).DoJSONRequest(context.Background(), "POST", "/events", e, nil)
if code >= 400 || errD != nil {
log.Error(ctx, "PushInElasticSearch> Unable to send event %s to elasticsearch [%d]: %v", e.EventType, code, errD)
Expand Down

0 comments on commit e834a00

Please sign in to comment.