Skip to content

Commit

Permalink
Add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
kuiperda committed Sep 13, 2024
1 parent f809b1a commit 9139ce1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/stanza/operator/input/windows/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,13 @@ func (i *Input) read(ctx context.Context) int {
events, err := i.subscription.Read(i.maxReads)
if err != nil {
i.Logger().Error("Failed to read events from subscription", zap.Error(err))
i.Logger().Info("Closing subscription")
closeErr := i.subscription.Close()
if closeErr != nil {
i.Logger().Error("Failed to close subscription", zap.Error(closeErr))
return 0
}
i.Logger().Info("Recreating subscription")
i.Logger().Info("Resubscribing")
i.subscription = NewRemoteSubscription(i.remote.Server)
return 0
}
Expand Down

0 comments on commit 9139ce1

Please sign in to comment.