All Downloads are FREE. Search and download functionalities are using the official Maven repository.

.nacos.nacos-client.2.0.0.source-code.nacos-logback.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 debug="false" scan="true" scanPeriod="30 seconds" packagingData="true">
    <contextName>nacos</contextName>
    
    <appender name="CONFIG_LOG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${JM.LOG.PATH}/nacos/config.log</file>
        
        <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
            <fileNamePattern>${JM.LOG.PATH}/nacos/config.log.%i</fileNamePattern>
            <maxIndex>${JM.LOG.RETAIN.COUNT:-7}</maxIndex>
        </rollingPolicy>
        
        <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
            <maxFileSize>${JM.LOG.FILE.SIZE:-10MB}</maxFileSize>
        </triggeringPolicy>
        
        <encoder>
            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %p [%-5t:%c{2}] %m%n</pattern>
        </encoder>
    </appender>
    
    <appender name="NAMING_LOG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${JM.LOG.PATH}/nacos/naming.log</file>
        
        <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
            <fileNamePattern>${JM.LOG.PATH}/nacos/naming.log.%i</fileNamePattern>
            <maxIndex>${JM.LOG.RETAIN.COUNT:-7}</maxIndex>
        </rollingPolicy>
        
        <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
            <maxFileSize>${JM.LOG.FILE.SIZE:-10MB}</maxFileSize>
        </triggeringPolicy>
        
        <encoder>
            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %p [%-5t:%c{2}] %m%n</pattern>
        </encoder>
    </appender>
    
    <appender name="REMOTE_LOG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${JM.LOG.PATH}/nacos/remote.log</file>
        
        <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
            <fileNamePattern>${JM.LOG.PATH}/nacos/remote.log.%i</fileNamePattern>
            <maxIndex>${JM.LOG.RETAIN.COUNT:-7}</maxIndex>
        </rollingPolicy>
        
        <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
            <maxFileSize>${JM.LOG.FILE.SIZE:-10MB}</maxFileSize>
        </triggeringPolicy>
        
        <encoder>
            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %p [%-5t:%c{2}] %m%n</pattern>
        </encoder>
    </appender>
    
    
    <logger name="com.alibaba.nacos.client" level="${com.alibaba.nacos.config.log.level:-info}"
        additivity="false">
        <appender-ref ref="CONFIG_LOG_FILE"/>
    </logger>
    
    
    <Logger name="com.alibaba.nacos.common.remote.client" level="${com.alibaba.nacos.log.level:-info}"
        additivity="false">
        <appender-ref ref="REMOTE_LOG_FILE"/>
    </Logger>
    
    
    <logger name="com.alibaba.nacos.client.config" level="${com.alibaba.nacos.config.log.level:-info}"
        additivity="false">
        <appender-ref ref="CONFIG_LOG_FILE"/>
    </logger>
    
    <logger name="com.alibaba.nacos.client.naming" level="${com.alibaba.nacos.naming.log.level:-info}"
        additivity="false">
        <appender-ref ref="NAMING_LOG_FILE"/>
    </logger>

</configuration>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy