Kafka log level adjust with yaml file

11/18/2019

I'm running Kafka in a Kubernetes environment. I want to adjust kafka log level to WARN. I have a yaml file which I used with helm install. In that yaml, there is a envOverrides parameter. Can I just add the following? And then kubectl apply?

Before:

envOverrides: {}

After:

# Do I need { } ? 
envOverrides:
  kafka.log4j.root.loglevel: WARN
  kafka.log4j.loggers: "kafka.controller=WARN,kafka.producer.async.DefaultEventHandler=WARN,state.change.logger=WARN"
-- Jin Lee
apache-kafka
kubernetes

1 Answer

11/19/2019

The environment variables are KAFKA_LOG4J_ROOT_LOGLEVEL and KAFKA_LOG4J_LOGGERS

https://docs.confluent.io/current/installation/docker/operations/logging.html

-- OneCricketeer
Source: StackOverflow