Skip to content

Commit 72deb83

Browse files
committed
Removed unused log packagae & updated context package name to eliminate test conflict
1 parent b2acc38 commit 72deb83

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tailer/kafkaTailer.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
package tailer
22

33
import (
4-
"context"
5-
"log"
4+
ctx "context"
65
"sync"
76

87
"github.com/Shopify/sarama"
@@ -54,7 +53,7 @@ func initKafkaConsumer(lineChan chan *fswatcher.Line, errorChan chan fswatcher.E
5453

5554
version, err := sarama.ParseKafkaVersion(cfg.KafkaVersion)
5655
if err != nil {
57-
log.Panicf("[Kafka] Error parsing Kafka version: %v", err)
56+
logrus.Panicf("[Kafka] Error parsing Kafka version: %v", err)
5857
}
5958

6059
/**
@@ -90,7 +89,7 @@ func initKafkaConsumer(lineChan chan *fswatcher.Line, errorChan chan fswatcher.E
9089
* Setup a new Sarama consumer group
9190
*/
9291

93-
ctx, cancel := context.WithCancel(context.Background())
92+
ctx, cancel := ctx.WithCancel(ctx.Background())
9493
client, err := sarama.NewConsumerGroup(cfg.KafkaBrokers, cfg.KafkaConsumerGroupName, kafkaConfig)
9594
if err != nil {
9695
consumer.errorChan <- fswatcher.NewError(fswatcher.NotSpecified, err, "[Kafka] Error creating client")

0 commit comments

Comments
 (0)