<?xml version="1.0" encoding="UTF-8"?>

<configuration scan="true">

    <contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
        <resetJUL>true</resetJUL>
    </contextListener>

    <appender name="ROLLINGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>/home/quant_group/logs/${project.name}.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
            <fileNamePattern>/home/quant_group/logs/${project.name}.%d{yyyy-MM-dd}-%i.log</fileNamePattern>
            <maxHistory>90</maxHistory>
            <maxFileSize>512MB</maxFileSize>
            <totalSizeCap>10GB</totalSizeCap>
            <cleanHistoryOnStart>true</cleanHistoryOnStart>
        </rollingPolicy>
        <encoder>
            <charset>utf-8</charset>
            <Pattern>[%d{yyyy-MM-dd HH:mm:ss.SSS}][%p][%t|%logger{1.}|%M] - %msg %ex{full}%n</Pattern>
        </encoder>
    </appender>

    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <!--<pattern>%-4relative [%thread] %-5level %logger{35} - %msg %ex{full}%n</pattern>-->
            <pattern>[%d{yyyy-MM-dd HH:mm:ss.SSS}][%p][%t|%logger{1.}|%M] - %msg %ex{full}%n</pattern>
        </encoder>
    </appender>

    <logger name="cn.quant.baa.pay" level="INFO"/>
    <logger name="javax.activation" level="ERROR"/>
    <logger name="org.quartz.core" level="ERROR"/>
    <logger name="org.quartz.simpl" level="ERROR"/>
    <logger name="io.lettuce.core" level="ERROR"/>
    <logger name="io.netty" level="ERROR"/>
    <logger name="com.zaxxer.hikari.pool" level="ERROR"/>
    <logger name="com.alibaba.dubbo.common.extension" level="ERROR"/>
    <logger name="sun.net.www.protocol.http" level="ERROR"/>
    <logger name="com.ctrip.framework.apollo.internals" level="ERROR"/>
    <logger name="org.apache.zookeeper" level="ERROR"/>
    <logger name="org.apache.curator" level="ERROR"/>
    <logger name="org.apache.coyote" level="ERROR"/>
    <logger name="org.apache.catalina" level="ERROR"/>
    <logger name="org.hibernate.hql" level="ERROR"/>
    <logger name="org.hibernate.loader" level="ERROR"/>
    <logger name="org.hibernate.type" level="ERROR"/>
    <logger name="org.hibernate.persister" level="ERROR"/>
    <logger name="org.hibernate.cfg" level="ERROR"/>
    <logger name="org.hibernate.mapping" level="ERROR"/>
    <logger name="org.hibernate.jpa.event" level="ERROR"/>
    <logger name="org.hibernate.validator.internal" level="ERROR"/>
    <logger name="org.hibernate.engine.internal" level="ERROR"/>
    <logger name="org.hibernate.boot.model" level="ERROR"/>
    <logger name="org.hibernate.boot.internal" level="ERROR"/>
    <logger name="org.apache.tomcat.util" level="ERROR"/>
    <logger name="org.springframework.orm" level="ERROR"/>
    <logger name="org.springframework.jmx" level="ERROR"/>
    <logger name="org.springframework.jndi" level="ERROR"/>
    <logger name="org.springframework.aop" level="ERROR"/>
    <logger name="org.springframework.web" level="ERROR"/>
    <logger name="org.springframework.context" level="ERROR"/>
    <logger name="org.springframework.core" level="ERROR"/>
    <logger name="org.springframework.beans" level="ERROR"/>
    <logger name="org.springframework.boot.web" level="ERROR"/>
    <logger name="org.springframework.boot.actuate" level="ERROR"/>
    <logger name="org.springframework.boot.context" level="ERROR"/>
    <logger name="org.springframework.boot.autoconfigure.logging" level="ERROR"/>
    <logger name="org.springframework.data.redis" level="ERROR"/>
    <logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="TRACE"/>
    <logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="ERROR"/>
    <logger name="org.hibernate.engine.QueryParameters" level="ERROR"/>
    <logger name="org.hibernate.SQL" level="ERROR" />

    <root level="INFO">
        <appender-ref ref="STDOUT"/>
        <appender-ref ref="ROLLINGFILE"/>
    </root>

</configuration>