Skip to content

Commit

Permalink
[receiver/receivercreator] Log errors on receiver start/stop failures
Browse files Browse the repository at this point in the history
Searched for other calls to logger.Error without including err.
  • Loading branch information
jrcamp committed Apr 22, 2021
1 parent f56f902 commit bb1d823
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions receiver/receivercreator/observerhandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func (obs *observerHandler) OnAdd(added []observer.Endpoint) {
)

if err != nil {
obs.logger.Error("failed to start receiver", zap.String("receiver", template.id.String()))
obs.logger.Error("failed to start receiver", zap.String("receiver", template.id.String()), zap.Error(err))
continue
}

Expand All @@ -152,7 +152,7 @@ func (obs *observerHandler) OnRemove(removed []observer.Endpoint) {
obs.logger.Info("stopping receiver", zap.Reflect("receiver", rcvr), zap.String("endpoint_id", string(e.ID)))

if err := obs.runner.shutdown(rcvr); err != nil {
obs.logger.Error("failed to stop receiver", zap.Reflect("receiver", rcvr))
obs.logger.Error("failed to stop receiver", zap.Reflect("receiver", rcvr), zap.Error(err))
continue
}
}
Expand Down

0 comments on commit bb1d823

Please sign in to comment.