diff options
author | Pawel Kasperkiewicz <pawel.kasperkiewicz@nokia.com> | 2020-02-06 11:54:06 +0100 |
---|---|---|
committer | Pawel <pawel.kasperkiewicz@nokia.com> | 2020-02-07 07:59:25 +0100 |
commit | 6801658963291d7c0466c5ae836171b765da1d51 (patch) | |
tree | 6fea18ff7e3699a5a4e98fa2ec8623367487e718 /certService/src | |
parent | cadfc3ae7468df989bf8cd298eaf9030d04d94cf (diff) |
Create logger for trace, audit, error
Issue-ID: AAF-995
Signed-off-by: Pawel <pawel.kasperkiewicz@nokia.com>
Change-Id: Icda76509e23315910a52645d746ad4c7b80bf01e
Diffstat (limited to 'certService/src')
-rw-r--r-- | certService/src/main/resources/log4j2.xml | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/certService/src/main/resources/log4j2.xml b/certService/src/main/resources/log4j2.xml new file mode 100644 index 00000000..0c4d613f --- /dev/null +++ b/certService/src/main/resources/log4j2.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<Configuration status="INFO"> + + <Appenders> + + <Console name="CONSOLE" target="SYSTEM_OUT"> + <LevelRangeFilter maxLevel="INFO" 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.hibernate" level="ERROR"/> + <Logger name="org.apache" level="ERROR"/> + <Logger name="io.micrometer" 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>
\ No newline at end of file |