더북(TheBook)

    <appender name="audit" class="org.apache.log4j.RollingFileAppender">
        <param name="append" value="false"/> 
        <param name="maxFileSize" value="10KB"/> 
        <param name="maxBackupIndex" value="5"/> 
        <param name="file" value="c:/logs/audit.log"/> 

        <layout class="org.apache.log4j.PatternLayout"> 
            <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n"/> 
        </layout>

        <filter class="org.apache.log4j.varia.LevelRangeFilter">  
            <param name="LevelMin" value="warn"/> 
            <param name="LevelMax" value="warn"/> 
        </filter>
    </appender>

 

    <!-- Application Loggers -->
    <logger name="com.springmvc">
        <level value="info"/>
        <appender-ref ref="monitor"/>
        <appender-ref ref="audit"/>
    </logger>
    ...
</log4j:configuration>
신간 소식 구독하기
뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.