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

n.trust.slave.3.0.1.source-code.logback-dev.xml Maven / Gradle / Ivy

The newest version!
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="60 seconds" debug="false">

    <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>
    <conversionRule conversionWord="wex"
                    converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"/>
    <conversionRule conversionWord="wEx"
                    converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/>

    <property name="COMMON_LOG_PATTERN"
              value="%d [%t] %-5p %c{0} - %m [%X{X-B3-TraceId:-},%X{X-B3-SpanId:-},%X{X-Span-Export:-}]%n%xThrowable{500, FULL, bar}"/>
    <property name="MONITOR_LOG_PATTERN" value="%d [%t] %-5p %c{0} - %m,[%X{X-B3-TraceId:-}]%n"/>

    <!-- 项目名称 -->
    <property name="APP_NAME" value="slave"/>​
    <!-- 日志文件目录 -->
    <property name="LOG_PATH" value="/data/home/admin/trust/log"/>​
    <!-- 归档文件保留的时间,即只保留几天前的归档文件,单位与fileNamePattern中配置的最小时间单位相同 -->
    <property name="MAX_HISTORY" value="7"/>

    <appender name="BIZ-APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <encoder>
            <pattern>${COMMON_LOG_PATTERN}</pattern>
        </encoder>
        <file>${LOG_PATH}/${APP_NAME}-biz.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${LOG_PATH}/${APP_NAME}-biz.log.%d{yyyy-MM-dd}.gz</fileNamePattern>
            <maxHistory>${MAX_HISTORY}</maxHistory>
            <!--<totalSizeCap>${TOTAL_SIZE_CAP}</totalSizeCap>-->
        </rollingPolicy>
    </appender>

    <appender name="DEFAULT-APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <encoder>
            <pattern>${COMMON_LOG_PATTERN}</pattern>
        </encoder>
        <file>${LOG_PATH}/${APP_NAME}-default.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${LOG_PATH}/${APP_NAME}-default.log.%d{yyyy-MM-dd}.gz</fileNamePattern>
            <maxHistory>${MAX_HISTORY}</maxHistory>
            <!--<totalSizeCap>${TOTAL_SIZE_CAP}</totalSizeCap>-->
        </rollingPolicy>
    </appender>

    <appender name="MONITOR-APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <encoder>
            <pattern>${MONITOR_LOG_PATTERN}</pattern>
        </encoder>
        <file>${LOG_PATH}/${APP_NAME}-monitor.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${LOG_PATH}/${APP_NAME}-monitor.log.%d{yyyy-MM-dd}.gz</fileNamePattern>
            <maxHistory>${MAX_HISTORY}</maxHistory>
            <!--<totalSizeCap>${TOTAL_SIZE_CAP}</totalSizeCap>-->
        </rollingPolicy>
    </appender>

    <appender name="PERF-APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <encoder>
            <pattern>${MONITOR_LOG_PATTERN}</pattern>
        </encoder>
        <file>${LOG_PATH}/${APP_NAME}-perf.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${LOG_PATH}/${APP_NAME}-perf.log.%d{yyyy-MM-dd}.gz</fileNamePattern>
            <maxHistory>${MAX_HISTORY}</maxHistory>
            <!--<totalSizeCap>${TOTAL_SIZE_CAP}</totalSizeCap>-->
        </rollingPolicy>
    </appender>

    <appender name="DAO-DIGEST-APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <encoder>
            <pattern>${COMMON_LOG_PATTERN}</pattern>
        </encoder>
        <file>${LOG_PATH}/${APP_NAME}-dao-digest.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${LOG_PATH}/${APP_NAME}-dao-digest.log.%d{yyyy-MM-dd}.gz</fileNamePattern>
            <maxHistory>${MAX_HISTORY}</maxHistory>
        </rollingPolicy>
    </appender>

    <appender name="SERVICE-DIGEST-APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <encoder>
            <pattern>${MONITOR_LOG_PATTERN}</pattern>
        </encoder>
        <file>${LOG_PATH}/${APP_NAME}-service-digest.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${LOG_PATH}/${APP_NAME}-service-digest.log.%d{yyyy-MM-dd}.gz</fileNamePattern>
            <maxHistory>${MAX_HISTORY}</maxHistory>
            <!--<totalSizeCap>${TOTAL_SIZE_CAP}</totalSizeCap>-->
        </rollingPolicy>
    </appender>

    <appender name="MANAGE-APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <encoder>
            <pattern>${COMMON_LOG_PATTERN}</pattern>
        </encoder>
        <file>${LOG_PATH}/${APP_NAME}-manage.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${LOG_PATH}/${APP_NAME}-manage.log.%d{yyyy-MM-dd}.gz</fileNamePattern>
            <maxHistory>${MAX_HISTORY}</maxHistory>
            <!--<totalSizeCap>${TOTAL_SIZE_CAP}</totalSizeCap>-->
        </rollingPolicy>
    </appender>

    <!-- application monitor log -->
    <appender name="BFTSMART-APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <encoder>
            <pattern>${COMMON_LOG_PATTERN}</pattern>
        </encoder>
        <file>${LOG_PATH}/bft-smart.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${LOG_PATH}/bft-smart.log.%d{yyyy-MM-dd}.gz</fileNamePattern>
            <maxHistory>${MAX_HISTORY}</maxHistory>
        </rollingPolicy>
    </appender>

    <!-- application monitor log -->
    <appender name="COPYCAT-APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <encoder>
            <pattern>${COMMON_LOG_PATTERN}</pattern>
        </encoder>
        <file>${LOG_PATH}/copycat.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${LOG_PATH}/copycat.log.%d{yyyy-MM-dd}.gz</fileNamePattern>
            <maxHistory>${MAX_HISTORY}</maxHistory>
        </rollingPolicy>
    </appender>

    <appender name="ERROR-APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
            <level>ERROR</level>
        </filter>
        <encoder>
            <pattern>${COMMON_LOG_PATTERN}</pattern>
        </encoder>
        <file>${LOG_PATH}/common-error.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${LOG_PATH}/common-error.log.%d{yyyy-MM-dd}.gz</fileNamePattern>
            <maxHistory>${MAX_HISTORY}</maxHistory>
            <!--<totalSizeCap>${TOTAL_SIZE_CAP}</totalSizeCap>-->
        </rollingPolicy>
    </appender>

    <logger name="SmartLog" level="INFO" additivity="false">
        <appender-ref ref="BFTSMART-APPENDER"/>
        <appender-ref ref="ERROR-APPENDER"/>
    </logger>

    <logger name="io.atomix" level="trace" additivity="false">
        <appender-ref ref="COPYCAT-APPENDER"/>
        <appender-ref ref="ERROR-APPENDER"/>
    </logger>


    <logger name="MonitorLog" level="INFO" additivity="false">
        <appender-ref ref="MONITOR-APPENDER"/>
    </logger>

    <logger name="ManageLog" level="INFO" additivity="false">
        <appender-ref ref="MANAGE-APPENDER"/>
    </logger>

    <Logger name="DAO-DIGEST" level="INFO" additivity="false">
        <appender-ref ref="DAO-DIGEST-APPENDER"/>
        <appender-ref ref="ERROR-APPENDER"/>
    </Logger>

    <Logger name="SERVICE-DIGEST" level="INFO" additivity="false">
        <appender-ref ref="SERVICE-DIGEST-APPENDER"/>
        <appender-ref ref="ERROR-APPENDER"/>
    </Logger>

    <Logger name="com.higgschain.trust.common.utils.Profiler" level="debug" additivity="false">
        <appender-ref ref="PERF-APPENDER"/>
        <appender-ref ref="ERROR-APPENDER"/>
    </Logger>

    <logger name="com.higgschain.trust" level="debug" additivity="false">
        <appender-ref ref="BIZ-APPENDER"/>
        <appender-ref ref="ERROR-APPENDER"/>
    </logger>

    <root level="debug">
        <appender-ref ref="DEFAULT-APPENDER"/>
        <appender-ref ref="ERROR-APPENDER"/>
    </root>

</configuration>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy