wasala | d8e4e88 | 2018-03-28 14:20:58 +0200 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <configuration> |
wasala | 6930f1f | 2018-04-05 15:01:38 +0200 | [diff] [blame] | 3 | <include resource="org/springframework/boot/logging/logback/defaults.xml"/> |
| 4 | <property name="LOG_FILE" |
| 5 | value="${LOG_FILE:-${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}/}spring.log}"/> |
wasala | d8e4e88 | 2018-03-28 14:20:58 +0200 | [diff] [blame] | 6 | |
wasala | 6930f1f | 2018-04-05 15:01:38 +0200 | [diff] [blame] | 7 | <springProfile name="dev"> |
| 8 | <include resource="org/springframework/boot/logging/logback/console-appender.xml"/> |
| 9 | <appender name="ROLLING-FILE" |
| 10 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 11 | <encoder> |
| 12 | <pattern>${FILE_LOG_PATTERN}</pattern> |
| 13 | </encoder> |
| 14 | <file>${LOG_FILE}</file> |
wasala | 7598205 | 2018-06-20 09:52:54 +0200 | [diff] [blame^] | 15 | <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
wasala | 6930f1f | 2018-04-05 15:01:38 +0200 | [diff] [blame] | 16 | <fileNamePattern>${LOG_FILE}.%d{yyyy-MM-dd}.log</fileNamePattern> |
wasala | 7598205 | 2018-06-20 09:52:54 +0200 | [diff] [blame^] | 17 | <maxFileSize>50MB</maxFileSize> |
| 18 | <maxHistory>30</maxHistory> |
| 19 | <totalSizeCap>10GB</totalSizeCap> |
wasala | 6930f1f | 2018-04-05 15:01:38 +0200 | [diff] [blame] | 20 | </rollingPolicy> |
| 21 | </appender> |
| 22 | <root level="ERROR"> |
| 23 | <appender-ref ref="CONSOLE"/> |
| 24 | <appender-ref ref="ROLLING-FILE"/> |
| 25 | </root> |
| 26 | </springProfile> |
wasala | d8e4e88 | 2018-03-28 14:20:58 +0200 | [diff] [blame] | 27 | |
wasala | 6930f1f | 2018-04-05 15:01:38 +0200 | [diff] [blame] | 28 | <springProfile name="prod"> |
| 29 | <appender name="ROLLING-FILE" |
| 30 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 31 | <encoder> |
| 32 | <pattern>${FILE_LOG_PATTERN}</pattern> |
| 33 | </encoder> |
| 34 | <file>${LOG_FILE}</file> |
wasala | 7598205 | 2018-06-20 09:52:54 +0200 | [diff] [blame^] | 35 | <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
wasala | 6930f1f | 2018-04-05 15:01:38 +0200 | [diff] [blame] | 36 | <fileNamePattern>${LOG_FILE}.%d{yyyy-MM-dd}.%i.gz</fileNamePattern> |
wasala | 7598205 | 2018-06-20 09:52:54 +0200 | [diff] [blame^] | 37 | <maxFileSize>50MB</maxFileSize> |
| 38 | <maxHistory>30</maxHistory> |
| 39 | <totalSizeCap>10GB</totalSizeCap> |
wasala | 6930f1f | 2018-04-05 15:01:38 +0200 | [diff] [blame] | 40 | </rollingPolicy> |
| 41 | </appender> |
| 42 | |
| 43 | <root level="ERROR"> |
| 44 | <appender-ref ref="ROLLING-FILE"/> |
| 45 | </root> |
| 46 | </springProfile> |
wasala | d8e4e88 | 2018-03-28 14:20:58 +0200 | [diff] [blame] | 47 | </configuration> |