Skip to content

Commit

Permalink
warning on ParseRecord failure
Browse files Browse the repository at this point in the history
  • Loading branch information
5amCurfew committed Mar 11, 2024
1 parent 57160df commit 84e1e3a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/record.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ func ParseRecord(record []byte, resultChan chan<- *interface{}) {
if err := json.Unmarshal(record, &data); err == nil {
if processedData, err := processRecord(&data); err == nil && processedData != nil {
resultChan <- processedData
} else if err != nil {
log.Warn(fmt.Sprintf("error parsing record %s: %v", data, err))
}
}
}
Expand Down

0 comments on commit 84e1e3a

Please sign in to comment.