From b2fdacdb57e3ef693d2c20dea4e7fed651102f5e Mon Sep 17 00:00:00 2001 From: stewartboyd119 Date: Tue, 3 Sep 2024 14:42:02 -0700 Subject: [PATCH] RMPMP-242: Updated `dltOption`s logs on error --- workoption.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workoption.go b/workoption.go index dea7b3c..7270107 100644 --- a/workoption.go +++ b/workoption.go @@ -119,7 +119,7 @@ func (d dltOption) apply(w *Work) { // establish a writer to the DLT early, so when the time comes the write is fast writer, err := w.kafkaProvider.Writer(ctx, d.dltConfig) if err != nil { - w.logger.Errorw(ctx, "Failed to get writer for dlt", "error", err, "offset", message.Offset, "partition", message.Partition, "topic", message.Topic) + w.logger.Errorw(ctx, "Failed to get writer for dlt", "error", err, "offset", message.Offset, "partition", message.Partition, "source_topic", message.Topic, "dlt_topic", d.dltConfig.Topic) return } @@ -136,7 +136,7 @@ func (d dltOption) apply(w *Work) { } if _, err := writer.WriteRaw(ctx, &message.Key, message.value); err != nil { - w.logger.Errorw(ctx, "Failed to forward to DLT", "error", err, "offset", message.Offset, "partition", message.Partition, "topic", message.Topic) + w.logger.Errorw(ctx, "Failed to forward to DLT", "error", err, "offset", message.Offset, "partition", message.Partition, "source_topic", message.Topic, "dlt_topic", d.dltConfig.Topic) } } w.onDones = append(w.onDones, f)