FB 1646 : Code updated to make the debug message more helpful

This commit is contained in:
HHans09 2022-09-26 11:51:01 -04:00 committed by HHans09
parent 3bb825a908
commit 5a66d283f0

View file

@ -233,11 +233,17 @@ func (r *Record) Commit(ctx context.Context) error {
p = x.Partition
}
_, err := r.src.CommitMessages(r.src.highmarks)
committedOffsets, err := r.src.CommitMessages(r.src.highmarks)
if err != nil {
return errors.Wrap(err, "failed to commit messages")
}
if r.src.Verbose {
for _, o := range committedOffsets {
r.src.Log.Debugf("p: %v o: %v t: %v", o.Partition, o.Offset, o.Topic)
}
}
r.src.spool = remaining
r.src.spoolBase = idx
return nil
@ -316,6 +322,10 @@ func (s *Source) Open() error {
return errors.Wrap(err, "subscribe topics")
}
if s.Verbose {
s.Log.Debugf("subscribed to %v", s.Topics)
}
s.client = cl
s.opened = true
s.wg.Add(1)