<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <!-- 格式化输出：%date表示日期，%thread表示线程名，%-5level：级别从左显示5个字符宽度 %msg：日志消息，%n是换行符-->
    <property name="LOG_PATTERN"
		value="%d{yyyy/MM/dd-HH:mm:ss} %level [%thread] %caller{1} - %msg%n" />
    <!-- 定义日志存储的路径，不要配置相对路径 -->
    <property name="FILE_PATH" value="./logs/WorkflowServer.%d{yyyy-MM-dd}.%i.log" />
 
    <!-- 控制台输出日志 -->
    <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <!-- 按照上面配置的LOG_PATTERN来打印日志 -->
            <pattern>${LOG_PATTERN}</pattern>
        </encoder>
    </appender>
 
    <!--每天生成一个日志文件，保存15天的日志文件。rollingFile是用来切分文件的 -->
    <appender name="FILE"
              class="ch.qos.logback.core.rolling.RollingFileAppender">
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${FILE_PATH}</fileNamePattern>
            <!-- keep 15 days' worth of history -->
            <maxHistory>15</maxHistory>
            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
                <!-- 日志文件的最大大小 -->
                <maxFileSize>10MB</maxFileSize>
            </timeBasedFileNamingAndTriggeringPolicy>
        </rollingPolicy>
 
        <encoder>
            <pattern>${LOG_PATTERN}</pattern>
        </encoder>
    </appender>
    
    <!-- project default level -->
    <logger name="src" level="DEBUG" />
   	<!-- 第三方日志系统 -->
    <logger name="org.springframework" level="error"/>
    <logger name="org.hibernate" level="error"/>
    <logger name="com.mchange.v2" level="error"/>
    <logger name="com.alibaba.druid" level="error"/>
    <logger name="org.eclipse.jetty" level="error"/>
    <logger name="net.sf.ehcache" level="error"/>
    <logger name="org.activiti" level="error"/>
    <logger name="org.apache.ibatis" level="error"/>
    <logger name="org.apache.http" level="error"/>
    <logger name="com.netflix" level="error"/>
    <logger name="org.quartz" level="error"/>     
    <logger name="liquibase.logging" level="error"/>
        
    <!-- 日志输出级别 常用的日志级别按照从高到低依次为：ERROR、WARN、INFO、DEBUG。 -->
    <root level="DEBUG">
        <appender-ref ref="CONSOLE" />
        <appender-ref ref="FILE" />
    </root>
    
    
</configuration>