summaryrefslogtreecommitdiffstats
path: root/certService/src/main/resources/log4j2.xml
blob: f814b4bd291b7f130aa7523a17d8e72c6a6159ff (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 status="INFO">

    <Appenders>

        <Console name="CONSOLE" target="SYSTEM_OUT">
            <LevelRangeFilter maxLevel="DEBUG" minLevel="ERROR"/>
            <PatternLayout
                    pattern="%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}} %highlight{${LOG_LEVEL_PATTERN:-%5p}}{FATAL=red blink, ERROR=red, WARN=yellow bold, INFO=green, DEBUG=green bold, TRACE=blue} %style{${sys:PID}}{magenta} [%15.15t] %style{%-40.40C{1.}}{cyan} : %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}"/>
        </Console>

        <RollingFile fileName="var/log/onap/aaf/certservice/error.log" filePattern="logs/error-%d{yyyy-MM-dd}-%i.log" name="ERROR_LOG">
            <LevelRangeFilter maxLevel="ERROR" minLevel="ERROR"/>
            <PatternLayout pattern="[%d{ISO8601}][%-5p][%-5c] %m%n"/>
            <Policies>
                <SizeBasedTriggeringPolicy size="50 MB"/>
            </Policies>
            <DefaultRolloverStrategy max="10"/>
        </RollingFile>

        <RollingFile fileName="var/log/onap/aaf/certservice/debug.log" filePattern="logs/debug-%d{yyyy-MM-dd}-%i.log" name="DEBUG_LOG">
            <LevelRangeFilter maxLevel="DEBUG" minLevel="ERROR"/>
            <PatternLayout pattern="[%d{ISO8601}][%-5p][%-5c] %m%n"/>
            <Policies>
                <SizeBasedTriggeringPolicy size="50 MB"/>
            </Policies>
        </RollingFile>

        <RollingFile fileName="var/log/onap/aaf/certservice/audit.log" filePattern="logs/audit-%d{yyyy-MM-dd}-%i.log" name="AUDIT_LOG">
            <LevelRangeFilter maxLevel="INFO" minLevel="INFO"/>
            <PatternLayout pattern="[%d{ISO8601}][%-5p][%-5c] %m%n"/>
            <Policies>
                <SizeBasedTriggeringPolicy size="50 MB"/>
            </Policies>
            <DefaultRolloverStrategy max="10"/>
        </RollingFile>

    </Appenders>

    <Loggers>

        <Logger name="org.springframework" level="ERROR"/>
        <Logger name="org.springdoc" level="ERROR"/>
        <Logger name="org.hibernate" level="ERROR"/>
        <Logger name="org.apache" level="ERROR"/>
        <Logger name="io.micrometer" level="ERROR"/>
        <Logger name="io.swagger" level="ERROR"/>

        <Root additivity="false" level="DEBUG">
            <AppenderRef ref="CONSOLE"/>
            <AppenderRef ref="ERROR_LOG"/>
            <AppenderRef ref="DEBUG_LOG"/>
            <AppenderRef ref="AUDIT_LOG"/>
        </Root>

    </Loggers>

</Configuration>