标签:span config coder soft add ons scan window encoding
1 <?xml version="1.0" encoding="UTF-8"?> 2 <configuration scan="true" scanPeriod="60 seconds" debug="false"> 3 <appender name="console" class="ch.qos.logback.core.ConsoleAppender"> 4 <encoding>UTF-8</encoding> 5 <encoder> 6 <pattern>[%d{HH:mm:ss.SSS}][%p][%c{40}][%t] %m%n</pattern> 7 </encoder> 8 <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> 9 <level>DEBUG</level> 10 </filter> 11 </appender> 12 13 <appender name="mall" class="ch.qos.logback.core.rolling.RollingFileAppender"> 14 <File>E:\software_setup\apache-tomcat-8.0.33-windows-x64\apache-tomcat-8.0.33\logs\mall.log</File> 15 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> 16 <fileNamePattern>E:\software_setup\apache-tomcat-8.0.33-windows-x64\apache-tomcat-8.0.33\logs\mall.log.%d{yyyy-MM-dd}.gz</fileNamePattern> 17 <append>true</append> 18 <maxHistory>10</maxHistory> 19 </rollingPolicy> 20 <encoder> 21 <pattern>[%d{HH:mm:ss.SSS}][%p][%c{40}][%t] %m%n</pattern> 22 </encoder> 23 </appender> 24 25 26 <appender name="error" class="ch.qos.logback.core.rolling.RollingFileAppender"> 27 <File>E:\software_setup\apache-tomcat-8.0.33-windows-x64\apache-tomcat-8.0.33\logs\error.log</File> 28 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> 29 <fileNamePattern>E:\software_setup\apache-tomcat-8.0.33-windows-x64\apache-tomcat-8.0.33\logs\error.log.%d{yyyy-MM-dd}.gz</fileNamePattern> 30 <append>true</append> 31 <maxHistory>10</maxHistory> 32 </rollingPolicy> 33 <encoder> 34 <pattern>[%d{HH:mm:ss.SSS}][%p][%c{40}][%t] %m%n</pattern> 35 </encoder> 36 <filter class="ch.qos.logback.classic.filter.LevelFilter"> 37 <level>ERROR</level> 38 <onMatch>ACCEPT</onMatch> 39 <onMismatch>DENY</onMismatch> 40 </filter> 41 </appender> 42 43 <logger name="com.mall" additivity="false" level="INFO" > 44 <appender-ref ref="mall" /> 45 <appender-ref ref="console"/> 46 </logger> 47 48 49 50 <!-- geelynote mybatis log 日志 --> 51 52 <logger name="com.mall.dao" level="DEBUG"/> 53 54 <root level="DEBUG"> 55 <appender-ref ref="console"/> 56 <appender-ref ref="error"/> 57 </root> 58 59 </configuration>
ps:将dao层的debug打开,使其可以打印sql语句以排错。
标签:span config coder soft add ons scan window encoding
原文地址:http://www.cnblogs.com/cing/p/7800955.html