logback-info.xml 1.14 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/portal.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>logback_logs/portal.%d{yyyy-MM-dd}.log.gz</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="info" />
    <!-- project default level
     <logger name="org.apache.shiro" level="debug" />
     -->
    <!--log4jdbc
    <logger name="jdbc.sqltiming" level="debug"/>
    -->
    <root level="info">
        <!--  <appender-ref ref="console" />-->
        <appender-ref ref="rollingFile" />
    </root>
</configuration>