META-INF.logback.nacos-included.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="UTF-8"?> <!-- ~ Copyright 1999-2018 Alibaba Group Holding Ltd. ~ ~ Licensed 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> <springProperty scope="context" name="logPath" source="nacos.logs.path" defaultValue="${user.home}/nacos/logs"/> <property name="LOG_HOME" value="${logPath}"/> <appender name="nacos-address" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${LOG_HOME}/nacos-address.log</file> <append>true</append> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <fileNamePattern>${LOG_HOME}/nacos-address.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <maxFileSize>2GB</maxFileSize> <maxHistory>15</maxHistory> <totalSizeCap>7GB</totalSizeCap> <cleanHistoryOnStart>true</cleanHistoryOnStart> </rollingPolicy> <encoder> <Pattern>%date %level %msg%n%n</Pattern> <charset>UTF-8</charset> </encoder> </appender> <logger name="com.alibaba.nacos.address.main" additivity="false"> <level value="INFO"/> <appender-ref ref="nacos-address"/> </logger> </included>