From 81ae25dbf0ac72a06b7ceb8a46c9813ba690daa3 Mon Sep 17 00:00:00 2001 From: Kaushik Iska Date: Fri, 9 Feb 2024 09:29:41 -0800 Subject: [PATCH] Add better logging to log the number of records (#1237) --- flow/connectors/postgres/cdc.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flow/connectors/postgres/cdc.go b/flow/connectors/postgres/cdc.go index 148d0fdd7c..69fbca87d4 100644 --- a/flow/connectors/postgres/cdc.go +++ b/flow/connectors/postgres/cdc.go @@ -225,7 +225,9 @@ func (p *PostgresCDCSource) consumeStream( shutdown := utils.HeartbeatRoutine(p.ctx, func() string { jobName := p.flowJobName currRecords := cdcRecordsStorage.Len() - return fmt.Sprintf("pulling records for job - %s, currently have %d records", jobName, currRecords) + msg := fmt.Sprintf("pulling records for job - %s, currently have %d records", jobName, currRecords) + p.logger.Info(msg) + return msg }) defer shutdown()