788
No
log4j
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration
xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="false">
<appender name="console" class="org.apache.log4j.ConsoleAppender">
<param name="encoding" value="UTF-8" />
<param name="Target" value="System.out" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %5p [%c][%M]%m%n" />
</layout>
<filter class="org.apache.log4j.varia.StringMatchFilter">
<param name="StringToMatch" value="Result" />
<param name="AcceptOnMatch" value="false" />
</filter>
</appender>
<!-- 날짜별 로그 파일 생성 -->
<appender name="rollingFile" class="org.apache.log4j.DailyRollingFileAppender">
<param name="encoding" value="UTF-8" />
<param name="File" value="/XXX_log/XXX.log"/>
<param name="DatePattern" value="'.'yyyyMMdd"/>
<param name="Append" value="true"/>
<param name="MaxFileSize" value="100MB"/>
<!-- param name="MaxBackupIndex" value="2"></param -->
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %p [%C{10}][%M] %m [%X{userId}]%n" />
</layout>
</appender>
<logger name="egovframework" >
<level value="DEBUG"/>
</logger>
<logger name="jdbc.sqltiming" >
<level value="DEBUG" />
</logger>
<logger name="org.springframework" >
<level value="DEBUG" />
</logger>
<logger name="com.ibatis">
<level value="DEBUG"/>
</logger>
<logger name="java.sql">
<level value="DEBUG"/>
</logger>
<root>
<level value="DEBUG" />
<appender-ref ref="console" />
<appender-ref ref="rollingFile"/>
</root>
</log4j:configuration>
댓글 ( 4)
댓글 남기기