diff options
author | GuangrongFu <fu.guangrong@zte.com.cn> | 2021-12-18 15:08:14 +0800 |
---|---|---|
committer | Guangrong Fu <fu.guangrong@zte.com.cn> | 2022-08-11 18:51:35 +0800 |
commit | c4bd70c1f74cd04c441f76de4359e166a089660a (patch) | |
tree | 634a0da7181a1fa8030fb6beb14d8a7d2f6d86c3 /engine-d/src/main/resources/logback-spring.xml | |
parent | 61da3e3d053548815054384e5e18750e87463ee9 (diff) |
Switched from Dropwizard to Springboot
Issue-ID: HOLMES-511
Signed-off-by: GuangrongFu <fu.guangrong@zte.com.cn>
Change-Id: I72b53ad4073e0a07a4c6a234781dc0d139584dda
Diffstat (limited to 'engine-d/src/main/resources/logback-spring.xml')
-rw-r--r-- | engine-d/src/main/resources/logback-spring.xml | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/engine-d/src/main/resources/logback-spring.xml b/engine-d/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..197057e --- /dev/null +++ b/engine-d/src/main/resources/logback-spring.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> +<configuration debug="false"> + <property name="LOG_HOME" value="/var/log/ONAP/holmes"/> + <property name="LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss SSS} %-5p [%c][%t] - %msg%n" /> + + <appender name="Console" class="ch.qos.logback.core.ConsoleAppender"> + <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> + <pattern>${LOG_PATTERN}</pattern> + <charset>UTF-8</charset> + </encoder> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>debug</level> + </filter> + </appender> + + <appender name="FileOutputForDebug" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${LOG_HOME}/holmes-engine-mgmt-debug.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${LOG_HOME}/archived/holmes-engine-mgmt-debug-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern> + <maxHistory>15</maxHistory> + <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> + <maxFileSize>100MB</maxFileSize> + </timeBasedFileNamingAndTriggeringPolicy> + </rollingPolicy> + <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> + <pattern>${LOG_PATTERN}</pattern> + <charset>UTF-8</charset> + </encoder> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>info</level> + </filter> + </appender> + + <appender name="FileOutputForError" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${LOG_HOME}/holmes-engine-mgmt-error.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${LOG_HOME}/archived/holmes-engine-mgmt-error-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern> + <maxHistory>15</maxHistory> + <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> + <maxFileSize>10MB</maxFileSize> + </timeBasedFileNamingAndTriggeringPolicy> + </rollingPolicy> + <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> + <pattern>${LOG_PATTERN}</pattern> + <charset>UTF-8</charset> + </encoder> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>error</level> + <onMatch>deny</onMatch> + <onMismatch>accept</onMismatch> + </filter> + </appender> + + <root level="info"> + <appender-ref ref="Console" /> + <appender-ref ref="FileOutputForDebug" /> + <appender-ref ref="FileOutputForError" /> + </root> +</configuration>
\ No newline at end of file |