From ab373b6b8d4951f52641cf42f13fb4e4fde9e546 Mon Sep 17 00:00:00 2001 From: Kirill Date: Fri, 7 Jul 2023 10:09:50 +0000 Subject: [PATCH] feat: log info init topics --- pkg/kafka/kafka.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/kafka/kafka.go b/pkg/kafka/kafka.go index a95d32f..94e9555 100644 --- a/pkg/kafka/kafka.go +++ b/pkg/kafka/kafka.go @@ -66,7 +66,7 @@ func Initialize(ctx context.Context, brokers, topics []string) error { for _, topic := range topics { isExist, err := kafka.TopicExists(ctx, topic) if err != nil { - lastInitializeErr = err + lastInitializeErr = fmt.Errorf("failed to check is topic <%s> exist on of : %w", topic, err) continue } @@ -75,7 +75,7 @@ func Initialize(ctx context.Context, brokers, topics []string) error { } if err := kafka.CreateTopic(ctx, topic); err != nil { - lastInitializeErr = fmt.Errorf("failed to create topic <%s> on of ", topic) + lastInitializeErr = fmt.Errorf("failed to create topic <%s> on of : %w", topic, err) } }