Skip to content

Commit

Permalink
better log
Browse files Browse the repository at this point in the history
  • Loading branch information
iskakaushik committed Oct 29, 2023
1 parent 9fc3aeb commit 58b0f50
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions flow/connectors/eventhub/eventhub.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,14 @@ func (c *EventHubConnector) processBatch(
utcMaxTSString = maxTime.UTC().Format(time.RFC3339)
}

// log utcMaxTSString, curTimeUTCSTring, difference in seconds
logstmt := fmt.Sprintf("[total] successfully sent %d records to event hub -"+
" max ts in utc - %s, current time in utc - %s, difference in seconds - %d",
numRecords, utcMaxTSString, time.Now().UTC().Format(time.RFC3339), int(time.Now().UTC().Sub(maxTime).Seconds()))

log.WithFields(log.Fields{
"flowName": flowJobName,
}).Infof("[total] successfully sent %d records to event hub - max ts in utc - %s",
numRecords, utcMaxTSString)
}).Infof(logstmt)
return uint32(numRecords), nil
}

Expand Down

0 comments on commit 58b0f50

Please sign in to comment.