feat: log info init topics

This commit is contained in:
Kirill 2023-07-07 10:09:50 +00:00
parent f349471fa4
commit ab373b6b8d

@ -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 <Initialize> of <BrokerService>: %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 <Initialize> of <BrokerService>", topic)
lastInitializeErr = fmt.Errorf("failed to create topic <%s> on <Initialize> of <BrokerService>: %w", topic, err)
}
}