log4j 특정 sql 제거하기
<Loggers>
<Logger name="org.apache" level="ERROR"></Logger>
<Logger name="org.springframework" level="ERROR"></Logger>
<Logger name="egovframework" level="ERROR"></Logger>
<Logger name="egovframework.let" level="DEBUG"></Logger>
<Logger name="egovframework.com.cmm" level="DEBUG"></Logger>
<Logger name="jdbc.sqlonly" level="DEBUG">
<RegexFilter regex="(?s).*NOT_SQL_LOG.*" onMatch="DENY" onMismatch="NEUTRAL" useRawMsg="true" />
</Logger>
<Logger name="jdbc.sqltiming" level="OFF"></Logger>
<Logger name="jdbc.audit" level="OFF"></Logger>
<Logger name="jdbc.resultset" level="OFF"></Logger>
<Logger name="jdbc.resultsettable" level="OFF"></Logger>
<Logger name="jdbc.connection" level="OFF"></Logger>
<logger name="java.sql.ResultSet" level="OFF"></logger>
<logger name="java.sql.PreparedStatement" level="OFF"></logger>
<logger name="java.sql.Connection" level="OFF"></logger>
<logger name="log4jdbc.debug" level="OFF"></logger>
<logger name="org.quartz.core.QuartzSchedulerThread" level="OFF"></logger>
<Root level="DEBUG">
<AppenderRef ref="console" />
<AppenderRef ref="RollingFile" />
</Root>
</Loggers>
<Logger name="jdbc.sqlonly" level="DEBUG">
<RegexFilter regex="(?s).*NOT_SQL_LOG.*" onMatch="DENY" onMismatch="NEUTRAL" useRawMsg="true" />
</Logger>
그리고sql mapper에
/* NOT_SQL_LOG */
위 주석을 삽입하면 해당 sql은 출력되지 않는다. ^^
'개발 > Java' 카테고리의 다른 글
MS Sql Server Express JDBC 연결 (0) | 2021.02.24 |
---|---|
Request.getRemoteAddr()을 호출하였을 때 IPv4 주소체계로 받고싶다 (0) | 2019.01.25 |
[WAS] GC 모니터링 및 튜닝하기 (0) | 2018.10.16 |