<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="60 seconds" debug="false">
    <contextName>logback</contextName>
    <property name="log.path" value="logs/admin/admin.log"/>
    <property name="CONSOLE_LOG_PATTERN"
              value="%date{yyyy-MM-dd HH:mm:ss} | %highlight(%-5level) | %boldYellow(%thread) | %boldGreen(%logger) | %msg%n"/>
    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>%d{HH:mm:ss.SSS}|%thread|%-5level|%logger{36}|%X{ip}|%X{seq}|%msg%n</pattern>
        </encoder>
    </appender>
    <appender name="file" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${log.path}</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>./logs/admin/admin-%d{yyyy-MM-dd}.log.gz</fileNamePattern>
        </rollingPolicy>
        <encoder>
            <pattern>%d{HH:mm:ss.SSS}|%thread|%-5level|%logger{36}|%X{ip}|%X{seq}|%msg%n</pattern>
        </encoder>
    </appender>
    <!-- <logger name="org.springframework.web" level="DEBUG"/> -->
    <logger name="org.springframework" level="info"/>
    <logger name="org.hibernate" level="info"/>
    <logger name="druid.sql" level="info"/>
    <!--        <logger name="druid.sql.ResultSet" level="info"/>-->
    <!--        <logger name="com.png.central.mapper.ExtMapper" level="info"/>-->
    <logger name="org.mybatis" level="info"/>
    <logger name="org.apache.ibatis" level="info"/>
    <logger name="io.lettuce.core" level="info"/>
    <logger name="io.netty" level="info"/>
    <logger name="springfox.documentation" level="warn"/>
    <logger name="org.apache.http" level="info"/>
    <logger name="io.lettuce" level="warn"/>
    <root level="debug">
        <appender-ref ref="console"/>
        <appender-ref ref="file"/>
    </root>
</configuration>