logback.xml 1.25 KB
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
        </encoder>
    </appender>

    <appender name="rollingFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>./logback_logs/shop.matter.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>./logback_logs/shop.matter.%d{yyyy-MM-dd}.log</fileNamePattern>
            <maxHistory>30</maxHistory><!--日志最大大小-->
        </rollingPolicy>
        <encoder>
            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
        </encoder>
    </appender>

    <logger name="cn.runsa" level="debug" />
    <logger name="net.sf.ehcache.constructs.web.filter" level="debug"/>
    <!--<logger name="org.quartz" level="debug" />-->
    <!-- project default level -->
    <logger name="org.apache.shiro" level="info" />
    <!--log4jdbc -->
    <logger name="jdbc.sqltiming" level="debug"/>

    <root level="info">
        <appender-ref ref="console" />
        <appender-ref ref="rollingFile" />
    </root>
</configuration>