META-INF.logback.nacos.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. --> <configuration> <springProperty scope="context" name="logPath" source="nacos.logs.path" defaultValue="${user.home}/nacos/logs"/> <property name="LOG_HOME" value="${logPath}"/> <include resource="org/springframework/boot/logging/logback/defaults.xml"/> <include resource="META-INF/logback/nacos-included.xml"/> <include optional="true" resource="META-INF/logback/config-included.xml"/> <include optional="true" resource="META-INF/logback/naming-included.xml"/> <include optional="true" resource="META-INF/logback/.xml"/> <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>${CONSOLE_LOG_PATTERN}</pattern> <charset>UTF-8</charset> </encoder> </appender> <appender name="rootFile" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${LOG_HOME}/nacos.log</file> <append>true</append> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <fileNamePattern>${LOG_HOME}/nacos.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <maxFileSize>50MB</maxFileSize> <maxHistory>15</maxHistory> <totalSizeCap>512MB</totalSizeCap> <cleanHistoryOnStart>true</cleanHistoryOnStart> </rollingPolicy> <encoder> <Pattern>%date %level %msg%n%n</Pattern> <charset>UTF-8</charset> </encoder> </appender> <appender name="core-auth" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${LOG_HOME}/core-auth.log</file> <append>true</append> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <fileNamePattern>${LOG_HOME}/core-auth.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <maxFileSize>2GB</maxFileSize> <maxHistory>7</maxHistory> <totalSizeCap>7GB</totalSizeCap> <cleanHistoryOnStart>true</cleanHistoryOnStart> </rollingPolicy> <encoder> <Pattern>%date %level %msg%n%n</Pattern> <charset>UTF-8</charset> </encoder> </appender> <appender name="protocol-raft" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${LOG_HOME}/protocol-raft.log</file> <append>true</append> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <fileNamePattern>${LOG_HOME}/protocol-raft.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <maxFileSize>2GB</maxFileSize> <maxHistory>7</maxHistory> <totalSizeCap>7GB</totalSizeCap> <cleanHistoryOnStart>true</cleanHistoryOnStart> </rollingPolicy> <encoder> <Pattern>%date %level %msg%n%n</Pattern> <charset>UTF-8</charset> </encoder> </appender> <appender name="remote-core" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${LOG_HOME}/remote-core.log</file> <append>true</append> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <fileNamePattern>${LOG_HOME}/remote-core.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <maxFileSize>2GB</maxFileSize> <maxHistory>7</maxHistory> <totalSizeCap>7GB</totalSizeCap> <cleanHistoryOnStart>true</cleanHistoryOnStart> </rollingPolicy> <encoder> <Pattern>%date %level %msg%n%n</Pattern> <charset>UTF-8</charset> </encoder> </appender> <appender name="remote-digest" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${LOG_HOME}/remote-digest.log</file> <append>true</append> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <fileNamePattern>${LOG_HOME}/remote-digest.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <maxFileSize>2GB</maxFileSize> <maxHistory>7</maxHistory> <totalSizeCap>7GB</totalSizeCap> <cleanHistoryOnStart>true</cleanHistoryOnStart> </rollingPolicy> <encoder> <Pattern>%date %level %msg%n%n</Pattern> <charset>UTF-8</charset> </encoder> </appender> <appender name="remote-push" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${LOG_HOME}/remote-push.log</file> <append>true</append> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <fileNamePattern>${LOG_HOME}/remote-push.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <maxFileSize>2GB</maxFileSize> <maxHistory>7</maxHistory> <totalSizeCap>7GB</totalSizeCap> <cleanHistoryOnStart>true</cleanHistoryOnStart> </rollingPolicy> <encoder> <Pattern>%date %level %msg%n%n</Pattern> <charset>UTF-8</charset> </encoder> </appender> <!--TPS control --> <appender name="plugin-control-connection" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${LOG_HOME}/plugin-control-connection.log</file> <append>true</append> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <fileNamePattern>${LOG_HOME}/plugin-control-connection.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <maxFileSize>2GB</maxFileSize> <maxHistory>7</maxHistory> <totalSizeCap>2GB</totalSizeCap> <cleanHistoryOnStart>true</cleanHistoryOnStart> </rollingPolicy> <encoder> <Pattern>%date %level %msg%n%n</Pattern> <charset>UTF-8</charset> </encoder> </appender> <appender name="plugin-control-tps" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${LOG_HOME}/plugin-control-tps.log</file> <append>true</append> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <fileNamePattern>${LOG_HOME}/plugin-control-tps.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <maxFileSize>2GB</maxFileSize> <maxHistory>7</maxHistory> <totalSizeCap>2GB</totalSizeCap> <cleanHistoryOnStart>true</cleanHistoryOnStart> </rollingPolicy> <encoder> <Pattern>%date %level %msg%n%n</Pattern> <charset>UTF-8</charset> </encoder> </appender> <appender name="plugin-control" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${LOG_HOME}/plugin-control.log</file> <append>true</append> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <fileNamePattern>${LOG_HOME}/plugin-control.%d{yyyy-MM-dd}.%i</fileNamePattern> <maxFileSize>2GB</maxFileSize> <maxHistory>14</maxHistory> <totalSizeCap>7GB</totalSizeCap> <cleanHistoryOnStart>true</cleanHistoryOnStart> </rollingPolicy> <encoder> <Pattern>%date %level %msg%n%n</Pattern> <charset>UTF-8</charset> </encoder> </appender> <appender name="protocol-distro" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${LOG_HOME}/protocol-distro.log</file> <append>true</append> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <fileNamePattern>${LOG_HOME}/protocol-distro.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <maxFileSize>2GB</maxFileSize> <maxHistory>7</maxHistory> <totalSizeCap>7GB</totalSizeCap> <cleanHistoryOnStart>true</cleanHistoryOnStart> </rollingPolicy> <encoder> <Pattern>%date %level %msg%n%n</Pattern> <charset>UTF-8</charset> </encoder> </appender> <appender name="nacos-cluster" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${LOG_HOME}/nacos-cluster.log</file> <append>true</append> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <fileNamePattern>${LOG_HOME}/nacos-cluster.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <maxFileSize>2GB</maxFileSize> <maxHistory>7</maxHistory> <totalSizeCap>7GB</totalSizeCap> <cleanHistoryOnStart>true</cleanHistoryOnStart> </rollingPolicy> <encoder> <Pattern>%date %level %msg%n%n</Pattern> <charset>UTF-8</charset> </encoder> </appender> <appender name="alipay-jraft" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${LOG_HOME}/alipay-jraft.log</file> <append>true</append> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <fileNamePattern>${LOG_HOME}/alipay-jraft.log.%d{yyyy-MM-dd}.%i</fileNamePattern> <maxFileSize>2GB</maxFileSize> <maxHistory>7</maxHistory> <totalSizeCap>7GB</totalSizeCap> <cleanHistoryOnStart>true</cleanHistoryOnStart> </rollingPolicy> <encoder> <Pattern>%date %level %msg%n%n</Pattern> <charset>UTF-8</charset> </encoder> </appender> <root> <level value="INFO"/> <appender-ref ref="rootFile"/> </root> <logger name="com.alibaba.nacos.core.auth" additivity="false"> <level value="DEBUG"/> <appender-ref ref="core-auth"/> </logger> <logger name="com.alibaba.nacos.core.remote" additivity="false"> <level value="DEBUG"/> <appender-ref ref="remote-core"/> </logger> <logger name="com.alibaba.nacos.core.remote.push" additivity="false"> <level value="DEBUG"/> <appender-ref ref="remote-push"/> </logger> <!-- TPS Control--> <logger name="com.alibaba.nacos.plugin.control" additivity="false"> <level value="DEBUG"/> <appender-ref ref="plugin-control"/> </logger> <logger name="com.alibaba.nacos.plugin.control.tps" additivity="false"> <level value="DEBUG"/> <appender-ref ref="plugin-control-tps"/> </logger> <logger name="com.alibaba.nacos.plugin.control.connection" additivity="false"> <level value="DEBUG"/> <appender-ref ref="plugin-control-connection"/> </logger> <logger name="com.alibaba.nacos.core.remote.digest" additivity="false"> <level value="DEBUG"/> <appender-ref ref="remote-digest"/> </logger> <logger name="com.alibaba.nacos.core.protocol.raft" additivity="false"> <level value="INFO"/> <appender-ref ref="protocol-raft"/> </logger> <logger name="com.alipay.sofa.jraft" additivity="false"> <level value="INFO"/> <appender-ref ref="alipay-jraft"/> </logger> <logger name="com.alibaba.nacos.core.protocol.distro" additivity="false"> <level value="INFO"/> <appender-ref ref="protocol-distro"/> </logger> <logger name="com.alibaba.nacos.core.cluster" additivity="false"> <level value="INFO"/> <appender-ref ref="nacos-cluster"/> </logger> <springProfile name="standalone"> <logger name="org.springframework"> <appender-ref ref="CONSOLE"/> <level value="INFO"/> </logger> <logger name="org.apache.catalina.startup.DigesterFactory"> <appender-ref ref="CONSOLE"/> <level value="INFO"/> </logger> <logger name="org.apache.catalina.util.LifecycleBase"> <appender-ref ref="CONSOLE"/> <level value="ERROR"/> </logger> <logger name="org.apache.coyote.http11.Http11NioProtocol"> <appender-ref ref="CONSOLE"/> <level value="WARN"/> </logger> <logger name="org.apache.tomcat.util.net.NioSelectorPool"> <appender-ref ref="CONSOLE"/> <level value="WARN"/> </logger> </springProfile> <logger name="com.alibaba.nacos.core.listener.StartingApplicationListener"> <appender-ref ref="CONSOLE"/> <level value="INFO"/> </logger> <logger name="com.alibaba.nacos.common.notify.NotifyCenter"> <appender-ref ref="CONSOLE"/> <level value="INFO"/> </logger> <logger name="com.alibaba.nacos.sys.file.WatchFileCenter"> <appender-ref ref="CONSOLE"/> <level value="INFO"/> </logger> <logger name="com.alibaba.nacos.common.executor.ThreadPoolManager"> <appender-ref ref="CONSOLE"/> <level value="INFO"/> </logger> </configuration>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy