如何更改kafka rest代理日志级别

how to change kafka rest proxy log level

我正在使用使用 docker compose 的 apache kafka rest 代理,它使繁重的日志文件比我的按摩大小更重我有任何参数要设置或要做什么来禁用它吗?

 kafka-schema-registry:
 image: confluentinc/cp-schema-registry:latest
 hostname: kafka-schema-registry
 ports:
   - "8082:8082"
 environment:
  SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: PLAINTEXT://kafka:9092
  SCHEMA_REGISTRY_HOST_NAME: kafka-schema-registry
  
  SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:8082
  depends_on:
   - zookeeper
   - kafka

kafka-rest-proxy:
 image: confluentinc/cp-kafka-rest:latest
 hostname: kafka-rest-proxy
 ports:
   - "8083:8083"
 environment:
  # KAFKA_REST_ZOOKEEPER_CONNECT: zoo1:2181
  KAFKA_REST_LISTENERS: http://0.0.0.0:8083/
  KAFKA_REST_SCHEMA_REGISTRY_URL: http://kafka-schema-registry:8081/
  KAFKA_REST_HOST_NAME: kafka-rest-proxy
  KAFKA_REST_BOOTSTRAP_SERVERS: PLAINTEXT://kafka:29092
depends_on:
  - zookeeper
  - kafka
  - kafka-schema-registry

KAFKA_REST_LOG4J_ROOT_LOGLEVEL默认为INFO,可改为WARNOFF

要将其他记录器设置为特定级别,您可以设置 KAFKA_REST_LOG4J_LOGGERS

来源 - https://github.com/confluentinc/kafka-rest-images/blob/master/kafka-rest/include/etc/confluent/docker/log4j.properties.template