blob: 365236ea14931650b032ced0b04d95e8229bf6a6 [file]
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to you under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<Configuration name="KafkaAppenderTest" status="OFF">
<Appenders>
<Kafka name="KafkaAppenderWithLayout" topic="kafka-topic">
<Property name="bootstrap.servers">localhost:9092</Property>
<Property name="timeout.ms">1000</Property>
<PatternLayout pattern="[%m]"/>
</Kafka>
<Kafka name="KafkaAppenderWithSerializedLayout" topic="kafka-topic">
<Property name="bootstrap.servers">localhost:9092</Property>
<Property name="timeout.ms">1000</Property>
<SerializedLayout/>
</Kafka>
<Kafka name="AsyncKafkaAppender" topic="kafka-topic">
<Property name="bootstrap.servers">localhost:9092</Property>
<Property name="syncSend">false</Property>
<PatternLayout pattern="%m"/>
</Kafka>
<Kafka name="KafkaAppenderWithKey" topic="kafka-topic" key="key" sendEventTimestamp="true">
<Property name="timeout.ms">1000</Property>
<Property name="bootstrap.servers">localhost:9092</Property>
<PatternLayout pattern="%m"/>
</Kafka>
<Kafka name="KafkaAppenderWithKeyLookup" topic="kafka-topic" key="$${date:dd-MM-yyyy}" sendEventTimestamp="true">
<Property name="timeout.ms">1000</Property>
<Property name="bootstrap.servers">localhost:9092</Property>
<PatternLayout pattern="%m"/>
</Kafka>
<Kafka name="KafkaAppenderWithRetryCount" topic="kafka-topic" retryCount="3" >
<Property name="timeout.ms">1000</Property>
<Property name="bootstrap.servers">fakeLocalhost:9092</Property>
<PatternLayout pattern="%m"/>
</Kafka>
<Kafka name="KafkaAppenderNoEventTimestamp" topic="kafka-topic" key="key" sendEventTimestamp="false">
<Property name="timeout.ms">1000</Property>
<Property name="bootstrap.servers">localhost:9092</Property>
<PatternLayout pattern="%m"/>
</Kafka>
</Appenders>
<Loggers>
<Root level="info">
<AppenderRef ref="KafkaAppenderWithLayout"/>
<AppenderRef ref="KafkaAppenderWithSerializedLayout"/>
<AppenderRef ref="AsyncKafkaAppender"/>
<AppenderRef ref="KafkaAppenderWithKey"/>
<AppenderRef ref="KafkaAppenderWithRetryCount"/>
<AppenderRef ref="KafkaAppenderNoEventTimestamp"/>
</Root>
</Loggers>
</Configuration>