Skip to content

Commit

Permalink
geodns-logs: don't stop processing on errors
Browse files Browse the repository at this point in the history
  • Loading branch information
abh committed Dec 17, 2021
1 parent 44f0076 commit a42b4b8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions geodns-logs/process-stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,16 +168,17 @@ func processChan(in chan string, wg *sync.WaitGroup) error {
for line := range in {
err := json.Unmarshal([]byte(line), &e)
if err != nil {
log.Printf("Can't unmarshal '%s': %s", line, err)
return err
log.Printf("unmarshal error '%s': %s", line, err)
continue
}
e.Name = strings.ToLower(e.Name)

// fmt.Printf("%s %s\n", e.Origin, e.Name)

err = stats.Add(&e)
if err != nil {
return err
log.Printf("stats error: %s", err)
continue
}
}

Expand Down

0 comments on commit a42b4b8

Please sign in to comment.