1234567891011121314151617181920212223 |
- <?xml version="1.0" encoding="UTF-8"?>
- <configuration>
- <springProperty scope="context" name="LOG_PATH" source="logging.file.path" defaultValue="/tmp" />
- <include resource="org/springframework/boot/logging/logback/defaults.xml" />
- <include resource="org/springframework/boot/logging/logback/console-appender.xml" />
- <appender name="TIME_FILE"
- class="ch.qos.logback.core.rolling.RollingFileAppender">
- <encoder>
- <pattern>${FILE_LOG_PATTERN}</pattern>
- </encoder>
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>${LOG_PATH}/meter-reading-job.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
- <maxHistory>365</maxHistory>
- <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
- <maxFileSize>100MB</maxFileSize>
- </timeBasedFileNamingAndTriggeringPolicy>
- </rollingPolicy>
- </appender>
- <root level="INFO">
- <appender-ref ref="CONSOLE" />
- <appender-ref ref="TIME_FILE" />
- </root>
- </configuration>
|