Skip to content
This repository has been archived by the owner on Jul 28, 2021. It is now read-only.

Commit

Permalink
Merge pull request #8 from keptn-contrib/patch/logging
Browse files Browse the repository at this point in the history
#1059 avoid calling .Fatal when logging non-fatal errors
  • Loading branch information
christian-kreuzberger-dtx authored Nov 21, 2019
2 parents 615b72d + 827bd67 commit 7d2e8ec
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,17 @@ func retrieveMetrics(event cloudevents.Event) error {
customQueries, err := getGlobalCustomQueries(kubeClient, stdLogger)

if err != nil {
log.Fatal(err)
stdLogger.Error("Failed to get global custom queries")
stdLogger.Error(err.Error())
return err
}

// get custom metrics for project
projectCustomQueries, err := getCustomQueriesForProject(eventData.Project, kubeClient, stdLogger)

if err != nil {
log.Fatal(err)
stdLogger.Error("Failed to get custom queries for project " + eventData.Project)
stdLogger.Error(err.Error())
return err
}

Expand Down

0 comments on commit 7d2e8ec

Please sign in to comment.