Skip to content

Commit

Permalink
Add logLevel to RetryConfiguration (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
nurerkartal authored Jul 4, 2023
1 parent 77e87d0 commit d0d767e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion consumer_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"time"

kcronsumer "github.com/Trendyol/kafka-cronsumer/pkg/kafka"
lcronsumer "github.com/Trendyol/kafka-cronsumer/pkg/logger"

"github.com/segmentio/kafka-go"
)
Expand Down Expand Up @@ -54,7 +55,7 @@ func (cfg *ConsumerConfig) newCronsumerConfig() *kcronsumer.Config {
StartOffset: kcronsumer.ToStringOffset(cfg.Reader.StartOffset),
RetentionTime: cfg.Reader.RetentionTime,
},
LogLevel: "info",
LogLevel: lcronsumer.Level(cfg.RetryConfiguration.LogLevel),
}

if !cfg.RetryConfiguration.SASL.IsEmpty() {
Expand Down Expand Up @@ -96,6 +97,7 @@ type RetryConfiguration struct {
Brokers []string
MaxRetry int
WorkDuration time.Duration
LogLevel LogLevel
}

type BatchConfiguration struct {
Expand Down

0 comments on commit d0d767e

Please sign in to comment.