Github user mikaelstaldal commented on the issue:

    https://github.com/apache/logging-log4j2/pull/112
  
    @flowcont I think it would make more sense to have the value for the key as 
an attribute on the Kafka appender element, and not as a nested property, since 
the nested properties are passed directly to the [Kafka client 
library](http://kafka.apache.org/documentation.html#producerconfigs).
    
    So you can specify it like this:
    
    ```
      <Appenders>
        <Kafka name="Kafka" topic="log-test" key="myKey">
          <PatternLayout pattern="%date %message"/>
          <Property name="bootstrap.servers">localhost:9092</Property>
        </Kafka>
      </Appenders>
    ```


---

Reply via email to