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

<configuration status="error" shutdownHook="disable">

    <Properties>
        <Property name="log-path">/bbc/log/</Property>
    </Properties>
    <!--先定义所有的appender-->
    <appenders>
        <!--这个输出控制台的配置-->
        <Console name="Console" target="SYSTEM_OUT">
            <PatternLayout pattern="%date{HH:mm:ss,SSS} [%thread] [%level] %logger{1.} - %msg%n"/>
        </Console>
        <RollingFile name="ServerRollingFile" fileName="${log-path}/smartid-server.log"
                     filePattern="${log-path}/smartid-server.log.%d{yyyyMMdd}">
            <PatternLayout pattern="%date{yyyy-MM-dd HH:mm:ss,SSS} [%thread] [%level] %logger{1.} - %msg%n"/>
            <Policies>
                <TimeBasedTriggeringPolicy/>
            </Policies>
        </RollingFile>
    </appenders>
    <!--然后定义logger，只有定义了logger并引入的appender，appender才会生效-->
    <loggers>
        <logger name="com.slodon.smartid" level="INFO"/>
        <logger name="org.springframework" level="INFO"/>

        <!--<logger name="org.springframework.kafka" level="DEBUG" />-->
        <!--
        <logger name="org.mybatis" level="DEBUG" />
        <logger name="java.sql" level="DEBUG"/>
         -->

        <!--建立一个默认的root的logger, 除了上面定义的logger，其他只有warn才会打印-->
        <root level="WARN">
            <appender-ref ref="ServerRollingFile"/>
            <appender-ref ref="Console"/>
        </root>
    </loggers>
</configuration>