| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?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.
- -->
- <included>
- <!-- kafka-appender properties -->
- <springProperty name="KAFKA_BOOTSTRAP_SERVERS" source="logging.extend.kafka-appender.bootstrap-servers" defaultValue="127.0.0.1:9092"/>
- <springProperty name="KAFKA_TOPIC" source="logging.extend.kafka-appender.topic" defaultValue="logback_to_logstash"/>
- <springProperty name="KAFKA_ACKS" source="logging.extend.kafka-appender.producer.acks" defaultValue="0"/>
- <springProperty name="KAFKA_LINGER_MS" source="logging.extend.kafka-appender.producer.linger-ms" defaultValue="1000"/>
- <springProperty name="KAFKA_MAX_BLOCK_MS" source="logging.extend.kafka-appender.producer.max-block-ms" defaultValue="0"/>
- <appender name="KAFKA" class="com.github.danielwegener.logback.kafka.KafkaAppender">
- <encoder>
- <!--<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS}|%p|${APPLICATION_NAME:-seata-server}|${RPC_PORT:-0}|%t|%logger|%X{X-TX-XID:-}|%X{X-TX-BRANCH-ID:-}|%m|%wex</pattern>-->
- <pattern>{
- "@timestamp": "%d{yyyy-MM-dd HH:mm:ss.SSS}",
- "level":"%p",
- "app_name":"${APPLICATION_NAME:-seata-server}",
- "PORT": ${RPC_PORT:-0},
- "thread_name": "%t",
- "logger_name": "%logger",
- "X-TX-XID": "%X{X-TX-XID:-}",
- "X-TX-BRANCH-ID": "%X{X-TX-BRANCH-ID:-}",
- "message": "%m",
- "stack_trace": "%wex"
- }
- </pattern>
- </encoder>
- <topic>${KAFKA_TOPIC}</topic>
- <keyingStrategy class="com.github.danielwegener.logback.kafka.keying.NoKeyKeyingStrategy"/>
- <deliveryStrategy class="com.github.danielwegener.logback.kafka.delivery.AsynchronousDeliveryStrategy"/>
- <producerConfig>bootstrap.servers=${KAFKA_BOOTSTRAP_SERVERS}</producerConfig>
- <producerConfig>acks=${KAFKA_ACKS}</producerConfig>
- <producerConfig>linger.ms=${KAFKA_LINGER_MS}</producerConfig>
- <producerConfig>max.block.ms=${KAFKA_MAX_BLOCK_MS}</producerConfig>
- </appender>
- </included>
|