diff --git a/eventstream.go b/eventstream.go index bba699c..e087282 100644 --- a/eventstream.go +++ b/eventstream.go @@ -75,7 +75,6 @@ type Event struct { // BrokerConfig is custom configuration for message broker type BrokerConfig struct { - LogMode string StrictValidation bool CACertFile string DialTimeout time.Duration diff --git a/example/main.go b/example/main.go index 37a68c8..e4368c8 100644 --- a/example/main.go +++ b/example/main.go @@ -27,7 +27,6 @@ import ( // nolint: funlen func main() { config := &eventstream.BrokerConfig{ - LogMode: eventstream.InfoLevel, StrictValidation: true, DialTimeout: 0, ReadTimeout: 0, diff --git a/kafka.go b/kafka.go index fea9473..d53b34e 100644 --- a/kafka.go +++ b/kafka.go @@ -23,7 +23,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "sync" "time" @@ -106,26 +105,9 @@ func setConfig(writerConfig *kafka.WriterConfig, readerConfig *kafka.ReaderConfi readerConfig.Dialer = dialer } - setLogLevel(config.LogMode) - return nil } -func setLogLevel(logMode string) { - switch logMode { - case DebugLevel: - logrus.SetLevel(logrus.DebugLevel) - case InfoLevel: - logrus.SetLevel(logrus.InfoLevel) - case WarnLevel: - logrus.SetLevel(logrus.WarnLevel) - case ErrorLevel: - logrus.SetLevel(logrus.ErrorLevel) - default: - logrus.SetOutput(ioutil.Discard) - } -} - // newKafkaClient create a new instance of KafkaClient func newKafkaClient(brokers []string, prefix string, config ...*BrokerConfig) (*KafkaClient, error) { logrus.Info("create new kafka client") diff --git a/kafka_integration_test.go b/kafka_integration_test.go index 61f9e41..d9f620f 100644 --- a/kafka_integration_test.go +++ b/kafka_integration_test.go @@ -49,7 +49,6 @@ func createKafkaClient(t *testing.T) Client { config := &BrokerConfig{ CACertFile: "", - LogMode: DebugLevel, StrictValidation: true, DialTimeout: time.Second, ReadTimeout: time.Second, @@ -67,7 +66,6 @@ func createInvalidKafkaClient(t *testing.T) Client { config := &BrokerConfig{ CACertFile: "", - LogMode: DebugLevel, StrictValidation: true, DialTimeout: time.Second, ReadTimeout: time.Second,