summaryrefslogtreecommitdiffstats
path: root/rulemgt/src/main/resources/logback-spring.xml
blob: db95b38b7791077736d46015bd8cd00efeb98418 (plain)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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][%X{RequestID}][%X{InvocationID}] - %m%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>info</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>accept</onMatch>
            <onMismatch>deny</onMismatch>
        </filter>
    </appender>

    <root level="info">
        <appender-ref ref="Console" />
        <appender-ref ref="FileOutputForDebug" />
        <appender-ref ref="FileOutputForError" />
    </root>
</configuration>