Skip to content

Commit

Permalink
Merge pull request #2185 from prometheus/errhandler
Browse files Browse the repository at this point in the history
kubernetes: only use one error logging handler
  • Loading branch information
fabxc authored Nov 14, 2016
2 parents e193579 + 530cdba commit ae806af
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions retrieval/discovery/kubernetes/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ type Kubernetes struct {
}

func init() {
runtime.ErrorHandlers = append(runtime.ErrorHandlers, func(err error) {
log.With("component", "kube_client_runtime").Errorln(err)
})
runtime.ErrorHandlers = []func(error){
func(err error) {
log.With("component", "kube_client_runtime").Errorln(err)
},
}
}

// New creates a new Kubernetes discovery for the given role.
Expand Down

0 comments on commit ae806af

Please sign in to comment.