aboutsummaryrefslogtreecommitdiffstats
path: root/certService/src/main/resources/log4j2.xml
blob: 48cc23c8179f702e8f2d1425afa8eef16db45120 (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
60
<?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="64 MB"/>
            </Policies>
            <DefaultRolloverStrategy max="10"/>
        </RollingFile>

        <RollingFile fileName="var/log/onap/aaf/certservice/trace.log" filePattern="logs/trace-%d{yyyy-MM-dd}-%i.log" name="TRACE_LOG">
            <LevelRangeFilter maxLevel="TRACE" minLevel="ERROR"/>
            <PatternLayout pattern="[%d{ISO8601}][%-5p][%-5c] %m%n"/>
            <Policies>
                <SizeBasedTriggeringPolicy size="64 MB"/>
            </Policies>
            <DefaultRolloverStrategy max="10"/>
        </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="32 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="TRACE">
            <AppenderRef ref="CONSOLE"/>
            <AppenderRef ref="ERROR_LOG"/>
            <AppenderRef ref="TRACE_LOG"/>
            <AppenderRef ref="AUDIT_LOG"/>
        </Root>

    </Loggers>

</Configuration>