diff options
author | Guangrong Fu <fu.guangrong@zte.com.cn> | 2021-12-28 10:14:42 +0800 |
---|---|---|
committer | Guangrong Fu <fu.guangrong@zte.com.cn> | 2022-08-11 20:18:53 +0800 |
commit | a796bda2f8e2db093ce9f528f6e5960e4aa1b22c (patch) | |
tree | 04642b9f3be109a5ccc051e4876851aa0b4fa3f3 /rulemgt/src/main/resources/logback-spring.xml | |
parent | 71ad58788ebfd666f6922fd9c16f77a9a4e39e27 (diff) |
Migrate from DW to Springboot
Issue-ID: HOLMES-511
Signed-off-by: Guangrong Fu <fu.guangrong@zte.com.cn>
Change-Id: I1be0775a4fc8b754218cd584a5de7af96b2ee0e2
Diffstat (limited to 'rulemgt/src/main/resources/logback-spring.xml')
-rw-r--r-- | rulemgt/src/main/resources/logback-spring.xml | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/rulemgt/src/main/resources/logback-spring.xml b/rulemgt/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..197057e --- /dev/null +++ b/rulemgt/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 |