Last active
October 23, 2015 01:59
-
-
Save mroger/05223db25655d02c546e to your computer and use it in GitHub Desktop.
Appenders to log JDBC data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration> | |
<property name="SERVER_LOG_PATH" value="${server.logging.path:-/var/log/fitnesstracker}"/> | |
... | |
<appender name="SQLONLY_SERVER_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | |
<file>${SERVER_LOG_PATH}/sqlonly.log</file> | |
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | |
<fileNamePattern>${SERVER_LOG_PATH}/sqlonly-%d{yyyy-MM-dd}.log</fileNamePattern> | |
<maxHistory>7</maxHistory> | |
</rollingPolicy> | |
<encoder> | |
<Pattern>%d{HH:mm:ss.SSS} %-5level SQLONLY [%X{xtid}] [%logger{36}] [%thread] %msg%n%ex</Pattern> | |
</encoder> | |
</appender> | |
... | |
<logger name="jdbc.sqlonly" level="INFO" additivity="false"> | |
<appender-ref ref="SQLONLY_SERVER_FILE"/> | |
</logger> | |
... | |
<root level="info"> | |
<appender-ref ref="STDOUT" /> | |
</root> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment