-
Notifications
You must be signed in to change notification settings - Fork 17
/
logback.xml
39 lines (33 loc) · 1.77 KB
/
logback.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
<!-- PROPERTIES -->
<property name="CONSOLE_LOG_PATTERN" value="%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}) [%thread] [%clr(${LOG_LEVEL_PATTERN:-%5p})] [%clr(%logger){cyan}]: %msg %n"/>
<property name="FILE_LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [${LOG_LEVEL_PATTERN:-%5p}] [%logger]: %msg %n"/>
<property name="LOG_FILE" value="logs/kouncil.log"/>
<property name="LOGBACK_ROLLINGPOLICY_FILE_NAME_PATTERN" value="logs/kouncil-%d{yyyy-MM-dd}.%i.${logging.rolling.file.extension:-log}"/>
<property name="LOGBACK_ROLLINGPOLICY_MAX_FILE_SIZE" value="${logging.file.max.size:-100MB}"/>
<property name="LOGBACK_ROLLINGPOLICY_MAX_HISTORY" value="${logging.file.max.history:-10}"/>
<!-- APPENDERS -->
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_FILE}</file>
<encoder>
<pattern>${FILE_LOG_PATTERN}</pattern>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${LOGBACK_ROLLINGPOLICY_FILE_NAME_PATTERN}</fileNamePattern>
<maxFileSize>${LOGBACK_ROLLINGPOLICY_MAX_FILE_SIZE}</maxFileSize>
<maxHistory>${LOGBACK_ROLLINGPOLICY_MAX_HISTORY}</maxHistory>
<totalSizeCap>1GB</totalSizeCap>
<cleanHistoryOnStart>true</cleanHistoryOnStart>
</rollingPolicy>
</appender>
<include resource="org/springframework/boot/logging/logback/console-appender.xml" />
<root level="INFO">
<appender-ref ref="CONSOLE" />
<appender-ref ref="FILE" />
</root>
<!-- LOGGERS -->
<logger name="com.consdata" level="DEBUG" />
<logger name="org.springframework.security" level="INFO"/>
</configuration>