用的wurstmeister/kafka
的 kafka 。
log4j.properties
文件在 /opt/kafka/config
目录下。
找到如下配置:
# Change the two lines below to adjust the general broker logging level (output to server.log and stdout)
## 重点在于修改此处
log4j.logger.kafka=INFO
log4j.logger.org.apache.kafka=INFO
把 log4j.properties
复制出来,挂载到docker容器里。然后修改级别为 DEBUG 。
注意,如果是挂载文件,需要删除容器,重新创建容器才生效。 如果是挂载的 config 文件夹,重启容器就生效了。
网友评论