Skip to content

Commit

Permalink
Remove ES info and debug logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
BerniVarga committed May 11, 2017
1 parent c16a9a3 commit eb8bbee
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion content_indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (indexer *contentIndexer) handleMessage(msg consumer.Message) {
}

uuid := combinedPostPublicationEvent.Content.UUID
log.Printf("[%s] Processing combined post publication event for uuid [%s]", tid, uuid)
log.Infof("[%s] Processing combined post publication event for uuid [%s]", tid, uuid)

var contentType string

Expand Down
7 changes: 2 additions & 5 deletions es_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ package main
import (
awsauth "github.com/smartystreets/go-aws-auth"
"gopkg.in/olivere/elastic.v2"
"log"
log "github.com/Sirupsen/logrus"
"net/http"
"os"
)

type esClientI interface {
Expand Down Expand Up @@ -48,8 +47,6 @@ var newAmazonClient = func(config esAccessConfig) (esClientI, error) {
elastic.SetScheme("https"),
elastic.SetHttpClient(signingClient),
elastic.SetSniff(false), //needs to be disabled due to EAS behavior. Healthcheck still operates as normal.
elastic.SetInfoLog(log.New(os.Stderr, "", log.LstdFlags)),
elastic.SetErrorLog(log.New(os.Stderr, "", log.LstdFlags)),
elastic.SetTraceLog(log.New(os.Stderr, "", log.LstdFlags)),
elastic.SetErrorLog(log.New()),
)
}
4 changes: 4 additions & 0 deletions es_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ func (service *esService) getSchemaHealth() (string, error) {
}
}

if service.elasticClient == nil {
return "not ok, connection to ES couldn't be established", nil
}

liveIndex, err := service.elasticClient.IndexGet().Index(service.indexName).Do()
if err != nil {
return "", err
Expand Down

0 comments on commit eb8bbee

Please sign in to comment.