<?xml version="1.0" encoding="UTF-8"?>
<configuration  scan="true" scanPeriod="60 seconds" debug="false">
    <contextName>logback</contextName>
    <!--输出到控制台-->
    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>%d{HH:mm:ss} [%thread] %-5level %logger{36} %msg%n</pattern>
        </encoder>
    </appender>

    <!--按天生成日志-->
    <appender name="logFile"  class="ch.qos.logback.core.rolling.RollingFileAppender">
        <Prudent>true</Prudent>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <FileNamePattern>
                logs/jk-server-%d{yyyy-MM-dd}.log
            </FileNamePattern>
        </rollingPolicy>
        <layout class="ch.qos.logback.classic.PatternLayout">
            <Pattern>
                [%d{yyyy-MM-dd HH:mm:ss}] [%thread] %-5level %logger{36} %msg%n
            </Pattern>
        </layout>
    </appender>
    
<!--	<logger name="org.mongodb" level="INFO" additivity="false">-->
<!--        <appender-ref ref="console"/>-->
<!--        <appender-ref ref="logFile" />-->
<!--    </logger>-->
<!--    -->
<!--    <logger name="org.mongodb.driver.cluster" level="INFO" additivity="false">-->
<!--        <appender-ref ref="console"/>-->
<!--        <appender-ref ref="logFile" />-->
<!--    </logger>-->
<!--    -->
<!--    <logger name="org.springframework.data.mongodbb" level="INFO" additivity="false">-->
<!--        <appender-ref ref="console"/>-->
<!--        <appender-ref ref="logFile" />-->
<!--    </logger>-->
    
    <logger name="org.springframework" level="INFO" additivity="false">
        <appender-ref ref="console"/>
        <appender-ref ref="logFile" />
    </logger>
   
    <logger name="com.qmth.jkserver" level="INFO" additivity="false">
        <appender-ref ref="console"/>
        <appender-ref ref="logFile" />
    </logger>
    
	 <root level="INFO">
         	<appender-ref ref="console"/>
        	<appender-ref ref="logFile" />
     </root>
</configuration>