Skip to content

Commit

Permalink
Remove redundant tracer check for data logging
Browse files Browse the repository at this point in the history
The debug log for received data messages now executes unconditionally, ensuring consistent logging behavior. This change simplifies the code and enhances traceability by always logging the received data.
  • Loading branch information
billettc committed Aug 15, 2024
1 parent 18fc86d commit eede626
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cmd/substreams-sink-noop/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,7 @@ func (s *Sinker) Run(ctx context.Context) {
}

func (s *Sinker) HandleBlockScopedData(ctx context.Context, data *pbsubstreamsrpc.BlockScopedData, isLive *bool, cursor *sink.Cursor) error {
if tracer.Enabled() {
zlog.Debug("data message received", zap.Reflect("data", data))
}
zlog.Debug("data message received", zap.Reflect("data", data))

block := bstream.NewBlockRef(data.Clock.Id, data.Clock.Number)
ProcessedBlockCount.Inc()
Expand Down

0 comments on commit eede626

Please sign in to comment.