<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <property name="LOG_PATH" value="/logs/zklt_plan_server"/>
    <property name="LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5level] %-40.40logger{39} : %msg%n"/>

    <!-- 控制台输出 -->
    <appender name="consoleLog" class="ch.qos.logback.core.ConsoleAppender">
        <!-- 彩色日志 -->
        <layout class="ch.qos.logback.classic.PatternLayout">
            <pattern>
                %d{yyyy-MM-dd HH:mm:ss} [%thread] %magenta(%-5level) %green([%-50.50class]) >>> %cyan(%msg) %n
            </pattern>
        </layout>
    </appender>
    <!-- 输出日志到数据库 -->
<!--    <appender name="DB" class="com.base.orbit.log.MyDBAppender">-->
<!--        <connectionSource class="ch.qos.logback.core.db.DriverManagerConnectionSource">-->
<!--            <driverClass>com.mysql.cj.jdbc.Driver</driverClass>-->
<!--            <url>jdbc:mysql://172.18.12.2:3306/orbit_base_biz?characterEncoding=utf-8&amp;serverTimezone=GMT%2B8</url>-->
<!--            <user>root</user>-->
<!--            <password>password</password>-->
<!--        </connectionSource>-->
<!--        &lt;!&ndash;        <connectionSource class="com.base.orbit.log.LogDBRewrite">&ndash;&gt;-->
<!--        &lt;!&ndash;        </connectionSource>&ndash;&gt;-->
<!--    </appender>-->

    <!-- 按照每天生成日志文件 -->
<!--    <appender name="fileLog" class="ch.qos.logback.core.rolling.RollingFileAppender">-->
<!--        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">-->
<!--            &lt;!&ndash;日志文件输出的文件名&ndash;&gt;-->
<!--            <FileNamePattern>${LOG_PATH}/cms.%d{yyyy-MM-dd}.%i.log</FileNamePattern>-->
<!--            &lt;!&ndash;日志文件最大的大小&ndash;&gt;-->
<!--            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">-->
<!--                <maxFileSize>100MB</maxFileSize>-->
<!--            </timeBasedFileNamingAndTriggeringPolicy>-->
<!--            &lt;!&ndash;日志文件保留天数&ndash;&gt;-->
<!--            <MaxHistory>30</MaxHistory>-->
<!--        </rollingPolicy>-->
<!--        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">-->
<!--            <pattern>${LOG_PATTERN}</pattern>-->
<!--        </encoder>-->
<!--    </appender>-->

    <!-- 日志输出级别 -->
    <root level="info">
        <appender-ref ref="consoleLog"/>
<!--        <appender-ref ref="fileLog"/>-->
<!--        <appender-ref ref="DB"/>-->
    </root>

</configuration>
