Created
February 3, 2016 08:28
-
-
Save ziscloud/2b9af88e6fcdcfb81954 to your computer and use it in GitHub Desktop.
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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<include resource="org/springframework/boot/logging/logback/defaults.xml"/> | |
<property name="LOG_FILE" value="${LOG_FILE:-${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}/}spring.log}"/> | |
<property name="METRICS_LOG_PATTERN" value="[${LOG_LEVEL_PATTERN:-%5p}][%d{yyyy-MM-dd HH:mm:ss SSS}][%t]%m%n"/> | |
<include resource="org/springframework/boot/logging/logback/console-appender.xml"/> | |
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | |
<encoder> | |
<pattern>${FILE_LOG_PATTERN}</pattern> | |
</encoder> | |
<file>${LOG_PATH}/${LOG_FILE}.log</file> | |
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | |
<fileNamePattern>${LOG_PATH}/${LOG_FILE}.%d{yyyy-MM-dd}.%i.log</fileNamePattern> | |
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> | |
<maxFileSize>100MB</maxFileSize> | |
</timeBasedFileNamingAndTriggeringPolicy> | |
</rollingPolicy> | |
</appender> | |
<appender name="METRICS" class="ch.qos.logback.core.rolling.RollingFileAppender"> | |
<encoder> | |
<pattern>${METRICS_LOG_PATTERN}</pattern> | |
</encoder> | |
<file>${LOG_PATH}/${LOG_FILE}-metrics.log</file> | |
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | |
<fileNamePattern>${LOG_PATH}/${LOG_FILE}-metrics.%d{yyyy-MM-dd}.%i.log</fileNamePattern> | |
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> | |
<maxFileSize>100MB</maxFileSize> | |
</timeBasedFileNamingAndTriggeringPolicy> | |
</rollingPolicy> | |
</appender> | |
<appender name="SQL" class="ch.qos.logback.core.rolling.RollingFileAppender"> | |
<encoder> | |
<pattern>${FILE_LOG_PATTERN}</pattern> | |
</encoder> | |
<file>${LOG_PATH}/${LOG_FILE}-sql.log</file> | |
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | |
<fileNamePattern>${LOG_PATH}/${LOG_FILE}-sql.%d{yyyy-MM-dd}.%i.log</fileNamePattern> | |
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> | |
<maxFileSize>100MB</maxFileSize> | |
</timeBasedFileNamingAndTriggeringPolicy> | |
</rollingPolicy> | |
</appender> | |
<logger name="metrics" level="TRACE" additivity="false"> | |
<appender-ref ref="METRICS"/> | |
</logger> | |
<logger name="org.hibernate" level="DEBUG" additivity="false"> | |
<appender-ref ref="SQL"/> | |
</logger> | |
<logger name="org.jooq" level="TRACE" additivity="false"> | |
<appender-ref ref="SQL"/> | |
</logger> | |
<root level="INFO"> | |
<appender-ref ref="FILE"/> | |
</root> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment