|
|
|
@ -32,6 +32,18 @@
|
|
|
|
|
<charset>${CONSOLE_LOG_CHARSET}</charset>
|
|
|
|
|
</encoder>
|
|
|
|
|
</appender>
|
|
|
|
|
|
|
|
|
|
<!-- ============================================================================= -->
|
|
|
|
|
<!-- SQL logging Appender defined -->
|
|
|
|
|
<!-- ============================================================================= -->
|
|
|
|
|
<appender name="SQL" class="ch.qos.logback.core.ConsoleAppender">
|
|
|
|
|
<!-- 기본 출력 로그 제거 -->
|
|
|
|
|
<Filter class="cokr.xit.adds.core.support.logback.ExcludeLogFilter"/>
|
|
|
|
|
<encoder>
|
|
|
|
|
<pattern>%d{yyyy-MM-dd HH:mm:ss} - SQL:\n%msg%n</pattern>
|
|
|
|
|
<charset>${CONSOLE_LOG_CHARSET}</charset>
|
|
|
|
|
</encoder>
|
|
|
|
|
</appender>
|
|
|
|
|
<!-- ============================================================================= -->
|
|
|
|
|
|
|
|
|
|
<!-- ============================================================================= -->
|
|
|
|
@ -106,6 +118,15 @@
|
|
|
|
|
<logger name="org.mybatis.spring.SqlSessionUtils" level="DEBUG" />
|
|
|
|
|
<!-- log4jdbc 옵션 설정 -->
|
|
|
|
|
<logger name="jdbc" level="OFF" additivity="false"/>
|
|
|
|
|
<!-- SQL문 출력 -->
|
|
|
|
|
<logger name="jdbc.sqlonly" level="OFF" additivity="false"/>
|
|
|
|
|
<!-- result를 포함한 모든 JDBC 호출 정보 -->
|
|
|
|
|
<logger name="jdbc.resultset" level="OFF" additivity="false"/>
|
|
|
|
|
<!-- DB connection open/close -->
|
|
|
|
|
<logger name="jdbc.connection" level="OFF" additivity="false"/>
|
|
|
|
|
<!-- resultset을 제외한 JDBC 호출 정보 -->
|
|
|
|
|
<logger name="jdbc.audit" level="OFF" additivity="false"/>
|
|
|
|
|
<logger name="org.mariadb.jdbc" level="ERROR" additivity="false"/>
|
|
|
|
|
|
|
|
|
|
<springProfile name="prod">
|
|
|
|
|
<!-- 운영 환경에서만 sql문 및 결과 출력하지 않음 -->
|
|
|
|
@ -118,20 +139,13 @@
|
|
|
|
|
<springProfile name="local, dev">
|
|
|
|
|
<!-- 로컬, 개발 환경에서는 sql문 및 결과 출력 -->
|
|
|
|
|
<!-- SQL문과 소요된 시간 -->
|
|
|
|
|
<logger name="jdbc.sqltiming" level="DEBUG" additivity="false"/>
|
|
|
|
|
<logger name="jdbc.sqltiming" level="DEBUG" additivity="false">
|
|
|
|
|
<appender-ref ref="SQL"/>
|
|
|
|
|
</logger>
|
|
|
|
|
<!-- SQL 결과 조회된 데이터를 table 형식으로 출력 -->
|
|
|
|
|
<logger name="jdbc.resultsettable" level="DEBUG" additivity="false"/>
|
|
|
|
|
<logger name="jdbc.resultsettable" level="OFF" additivity="false"/>
|
|
|
|
|
</springProfile>
|
|
|
|
|
|
|
|
|
|
<!-- SQL문 출력 -->
|
|
|
|
|
<logger name="jdbc.sqlonly" level="OFF" additivity="false"/>
|
|
|
|
|
<!-- result를 포함한 모든 JDBC 호출 정보 -->
|
|
|
|
|
<logger name="jdbc.resultset" level="OFF" additivity="false"/>
|
|
|
|
|
<!-- DB connection open/close -->
|
|
|
|
|
<logger name="jdbc.connection" level="OFF" additivity="false"/>
|
|
|
|
|
<!-- resultset을 제외한 JDBC 호출 정보 -->
|
|
|
|
|
<logger name="jdbc.audit" level="OFF" additivity="false"/>
|
|
|
|
|
<logger name="org.mariadb.jdbc" level="ERROR" additivity="false"/>
|
|
|
|
|
|
|
|
|
|
<!-- DB Connection Pool 관련 -->
|
|
|
|
|
<logger name="com.zaxxer.hikari.pool.PoolBase" level="ERROR" />
|
|
|
|
|