| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- <?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>
- <!-- file-appender properties -->
- <springProperty name="LOG_FILE_PATH" source="logging.file.path"
- defaultValue="${user.home}/logs/seata"/>
- <springProperty name="FILE_LOG_PATTERN" source="logging.pattern.file"
- defaultValue="%d{yyyy-MM-dd HH:mm:ss.SSS} %5p --- [%t] [%logger] [%M] [%X{X-TX-XID:-}]: %m%n%wEx2"/>
- <!--ALL-->
- <appender name="FILE_ALL" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${LOG_FILE_PATH}/${APPLICATION_NAME:-seata-server}.${RPC_PORT}.all.log</file>
- <append>true</append>
- <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
- <fileNamePattern>${LOG_FILE_PATH}/history/${APPLICATION_NAME:-seata-server}.${RPC_PORT}.all.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
- <maxFileSize>2GB</maxFileSize>
- <MaxHistory>7</MaxHistory>
- <totalSizeCap>7GB</totalSizeCap>
- <cleanHistoryOnStart>true</cleanHistoryOnStart>
- </rollingPolicy>
- <encoder>
- <Pattern>${FILE_LOG_PATTERN}</Pattern>
- <charset>UTF-8</charset>
- </encoder>
- </appender>
- <!--WARN-->
- <appender name="FILE_WARN" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <filter class="ch.qos.logback.classic.filter.LevelFilter">
- <level>WARN</level>
- <onMatch>ACCEPT</onMatch>
- <onMismatch>DENY</onMismatch>
- </filter>
- <file>${LOG_FILE_PATH}/${APPLICATION_NAME:-seata-server}.${RPC_PORT}.warn.log</file>
- <append>true</append>
- <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
- <fileNamePattern>${LOG_FILE_PATH}/history/${APPLICATION_NAME:-seata-server}.${RPC_PORT}.warn.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
- <maxFileSize>2GB</maxFileSize>
- <MaxHistory>7</MaxHistory>
- <totalSizeCap>7GB</totalSizeCap>
- <cleanHistoryOnStart>true</cleanHistoryOnStart>
- </rollingPolicy>
- <encoder>
- <Pattern>${FILE_LOG_PATTERN}</Pattern>
- <charset>UTF-8</charset>
- </encoder>
- </appender>
- <!--ERROR-->
- <appender name="FILE_ERROR" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <filter class="ch.qos.logback.classic.filter.LevelFilter">
- <level>ERROR</level>
- <onMatch>ACCEPT</onMatch>
- <onMismatch>DENY</onMismatch>
- </filter>
- <file>${LOG_FILE_PATH}/${APPLICATION_NAME:-seata-server}.${RPC_PORT}.error.log</file>
- <append>true</append>
- <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
- <fileNamePattern>${LOG_FILE_PATH}/history/${APPLICATION_NAME:-seata-server}.${RPC_PORT}.error.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
- <maxFileSize>2GB</maxFileSize>
- <MaxHistory>7</MaxHistory>
- <totalSizeCap>7GB</totalSizeCap>
- <cleanHistoryOnStart>true</cleanHistoryOnStart>
- </rollingPolicy>
- <encoder>
- <Pattern>${FILE_LOG_PATTERN}</Pattern>
- <charset>UTF-8</charset>
- </encoder>
- </appender>
- </included>
|