blob: 685a285021fef9e65111103b0de8b6a31d121466 [file] [log] [blame]
Jakub Latuseke0e8ca72020-10-21 13:36:29 +02001{{/*
jmac065e2ce2018-03-29 01:18:02 +00002################################################################################
3#
4# Licensed to the Apache Software Foundation (ASF) under one or more
5# contributor license agreements. See the NOTICE file distributed with
6# this work for additional information regarding copyright ownership.
7# The ASF licenses this file to You under the Apache License, Version 2.0
8# (the "License"); you may not use this file except in compliance with
9# the License. You may obtain a copy of the License at
10#
11# http://www.apache.org/licenses/LICENSE-2.0
12#
13# Unless required by applicable law or agreed to in writing, software
14# distributed under the License is distributed on an "AS IS" BASIS,
15# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16# See the License for the specific language governing permissions and
17# limitations under the License.
18#
19################################################################################
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +000020# Properties used as default values in MDC
Jakub Latuseke0e8ca72020-10-21 13:36:29 +020021*/}}
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +000022log4j2.property.ServiceName = INTERNAL
23log4j2.property.ErrorCode = 900
24log4j2.property.ErrorDesc = UnknownError
jmac065e2ce2018-03-29 01:18:02 +000025
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050026# Common properties
jmac065e2ce2018-03-29 01:18:02 +000027maxFileSize=100MB
28maxBackupIndex=20
29logDir=/var/log/onap
30componentName=sdnc
31logDirectory=${logDir}/${componentName}
32karafLogName=karaf
jmac065e2ce2018-03-29 01:18:02 +000033auditLogName=audit
34debugLogName=debug
Smokowski, Kevin (ks6305)2e8a6ce2020-06-22 14:07:14 -050035errorLogName=error
36metricsLogName=metric
37requestResponseLogName=request-response
38securityLogName=security
jmac065e2ce2018-03-29 01:18:02 +000039
Smokowski, Kevin (ks6305)2e8a6ce2020-06-22 14:07:14 -050040log4j2.rootLogger.level = INFO
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +000041log4j2.rootLogger.appenderRef.KarafFile.ref = KarafFile
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050042log4j2.rootLogger.appenderRef.PaxOsgi.ref = PaxOsgi
43log4j2.rootLogger.appenderRef.Console.ref = Console
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +000044log4j2.rootLogger.appenderRef.DebugFile.ref = DebugFile
45log4j2.rootLogger.appenderRef.ErrorFile.ref = ErrorFile
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050046log4j2.rootLogger.appenderRef.Console.filter.threshold.type = ThresholdFilter
Sylvain Desbureauxbcf72512020-07-22 10:45:18 +020047log4j2.rootLogger.appenderRef.Console.filter.threshold.level = ${env:KARAF_CONSOLE_LOG_LEVEL\:-OFF}
jmac065e2ce2018-03-29 01:18:02 +000048
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +000049log4j2.bundle.info = %X{bundle.id} - %.50X{bundle.name} - %X{bundle.version}
50# Veracode: Address Improper Output Neutralization for Logs CWE ID 117 flaw
51# \\R matches any new line character, any new line character will replaced with space (stripped)
52log4j2.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | ${log4j2.bundle.info} | %X{currentGraph} - %X{nodeId} | %replace{%m}{\\R}{ }%n
jmac065e2ce2018-03-29 01:18:02 +000053
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050054# Appenders configuration
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050055# Console appender not used by default (see log4j2.rootLogger.appenderRefs)
56log4j2.appender.console.type = Console
57log4j2.appender.console.name = Console
58log4j2.appender.console.layout.type = PatternLayout
59log4j2.appender.console.layout.pattern = ${log4j2.pattern}
jmac065e2ce2018-03-29 01:18:02 +000060
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050061# OSGi appender
62log4j2.appender.osgi.type = PaxOsgi
63log4j2.appender.osgi.name = PaxOsgi
64log4j2.appender.osgi.filter = *
jmac065e2ce2018-03-29 01:18:02 +000065
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +000066# KarafFile appender
67log4j2.appender.karaf.type = RollingRandomAccessFile
68log4j2.appender.karaf.name = KarafFile
Smokowski, Kevin (ks6305)2e8a6ce2020-06-22 14:07:14 -050069log4j2.appender.karaf.fileName = ${logDirectory}/${karafLogName}.log
70log4j2.appender.karaf.filePattern = ${logDirectory}/${karafLogName}.log.%i
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +000071# uncomment to not force a disk flush
72#log4j2.appender.karaf.immediateFlush = false
73log4j2.appender.karaf.append = true
74log4j2.appender.karaf.layout.type = PatternLayout
75log4j2.appender.karaf.layout.pattern = ${log4j2.pattern}
76log4j2.appender.karaf.policies.type = Policies
77log4j2.appender.karaf.policies.size.type = SizeBasedTriggeringPolicy
78log4j2.appender.karaf.policies.size.size = ${maxFileSize}
79log4j2.appender.karaf.strategy.type = DefaultRolloverStrategy
80log4j2.appender.karaf.strategy.max = ${maxBackupIndex}
81log4j2.appender.karaf.strategy.fileIndex = min
jmac065e2ce2018-03-29 01:18:02 +000082
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +000083#ecomp logging standards
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050084log4j2.appender.debug.type = RollingRandomAccessFile
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +000085log4j2.appender.debug.name = DebugFile
Smokowski, Kevin (ks6305)2e8a6ce2020-06-22 14:07:14 -050086log4j2.appender.debug.fileName = ${logDirectory}/${debugLogName}.log
87log4j2.appender.debug.filePattern = ${logDirectory}/${debugLogName}.log.%i
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +000088# uncomment to not force a disk flush
89#log4j2.appender.debug.immediateFlush = false
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050090log4j2.appender.debug.append = true
91log4j2.appender.debug.layout.type = PatternLayout
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +000092log4j2.appender.debug.layout.pattern = %d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|%-16.16t|%-5.5p|%-32.32c{1}|${log4j2.bundle.info}|%replace{%m}{\\R}{ }%n
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050093log4j2.appender.debug.policies.type = Policies
94log4j2.appender.debug.policies.size.type = SizeBasedTriggeringPolicy
95log4j2.appender.debug.policies.size.size = ${maxFileSize}
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +000096log4j2.appender.debug.strategy.type = DefaultRolloverStrategy
97log4j2.appender.debug.strategy.max = ${maxBackupIndex}
98log4j2.appender.debug.strategy.fileIndex = min
jmac065e2ce2018-03-29 01:18:02 +000099
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -0500100log4j2.appender.error.type = RollingRandomAccessFile
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000101log4j2.appender.error.name = ErrorFile
Smokowski, Kevin (ks6305)2e8a6ce2020-06-22 14:07:14 -0500102log4j2.appender.error.fileName = ${logDirectory}/${errorLogName}.log
103log4j2.appender.error.filePattern = ${logDirectory}/${errorLogName}.log.%i
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000104# uncomment to not force a disk flush
105#log4j2.appender.error.immediateFlush = false
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -0500106log4j2.appender.error.append = true
107log4j2.appender.error.layout.type = PatternLayout
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000108log4j2.appender.error.layout.pattern = %d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|%-16.16t|$\$\\\{ctx:ServiceName\}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%p|$\$\\\{ctx:ErrorCode\}|$\$\\\{ctx:ErrorDesc\}|%replace{%m}{\\R}{ }%ex{full}{separator(\\n)}%n
109
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -0500110log4j2.appender.error.policies.type = Policies
111log4j2.appender.error.policies.size.type = SizeBasedTriggeringPolicy
112log4j2.appender.error.policies.size.size = ${maxFileSize}
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000113log4j2.appender.error.strategy.type = DefaultRolloverStrategy
114log4j2.appender.error.strategy.max = ${maxBackupIndex}
115log4j2.appender.error.strategy.fileIndex = min
116log4j2.appender.error.filter.threshold.type = ThresholdFilter
117log4j2.appender.error.filter.threshold.level = WARN
jmac065e2ce2018-03-29 01:18:02 +0000118
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000119log4j2.appender.metric.type = RollingRandomAccessFile
120log4j2.appender.metric.name = MetricFile
Smokowski, Kevin (ks6305)2e8a6ce2020-06-22 14:07:14 -0500121log4j2.appender.metric.fileName = ${logDirectory}/${metricsLogName}.log
122log4j2.appender.metric.filePattern = ${logDirectory}/${metricsLogName}.log.%i
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000123# uncomment to not force a disk flush
124#log4j2.appender.metric.immediateFlush = false
125log4j2.appender.metric.append = true
126log4j2.appender.metric.layout.type = PatternLayout
Smokowski, Kevin (ks6305)2e8a6ce2020-06-22 14:07:14 -0500127log4j2.appender.metric.layout.pattern=%X{InvokeTimestamp}|%X{LogTimestamp}|%X{RequestID}|%X{ServiceInstanceID}|%-16.16t|%X{ServerFQDN}|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceID}|%p|%X{Severity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{ClientIPAddress}|%C{1}|||%X{TargetElement}|%X{slf4j.marker}|%X|%X{currentGraph} - %X{nodeId}|${log4j2.bundle.info}|%m%n
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000128log4j2.appender.metric.policies.type = Policies
129log4j2.appender.metric.policies.size.type = SizeBasedTriggeringPolicy
130log4j2.appender.metric.policies.size.size = ${maxFileSize}
131log4j2.appender.metric.strategy.type = DefaultRolloverStrategy
132log4j2.appender.metric.strategy.max = 100
133log4j2.appender.metric.strategy.fileIndex = min
134
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000135log4j2.appender.audit.type = RollingRandomAccessFile
136log4j2.appender.audit.name = AuditFile
Smokowski, Kevin (ks6305)2e8a6ce2020-06-22 14:07:14 -0500137log4j2.appender.audit.fileName = ${logDirectory}/${auditLogName}.log
138log4j2.appender.audit.filePattern = ${logDirectory}/${auditLogName}.log.%i
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000139# uncomment to not force a disk flush
140#log4j2.appender.audit.immediateFlush = false
141log4j2.appender.audit.append = true
142log4j2.appender.audit.layout.type = PatternLayout
Smokowski, Kevin (ks6305)2e8a6ce2020-06-22 14:07:14 -0500143log4j2.appender.audit.layout.pattern=%X{EntryTimestamp}|%X{LogTimestamp}|%X{RequestID}|%X{ServiceInstanceID}|%-16.16t|%X{ServerFQDN}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceID}|INFO|%X{Severity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{ClientIPAddress}|%C{1}|%X{AUDIT-Unused}|%X{AUDIT-ProcessKey}|%X{slf4j.marker}|%X|%X{currentGraph} - %X{nodeId}|${log4j2.bundle.info}|%m%n
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000144log4j2.appender.audit.policies.type = Policies
145log4j2.appender.audit.policies.size.type = SizeBasedTriggeringPolicy
146log4j2.appender.audit.policies.size.size = ${maxFileSize}
147log4j2.appender.audit.strategy.type = DefaultRolloverStrategy
148log4j2.appender.audit.strategy.max = ${maxBackupIndex}
149log4j2.appender.audit.strategy.fileIndex = min
150
Smokowski, Kevin (ks6305)2e8a6ce2020-06-22 14:07:14 -0500151log4j2.appender.rr.name = RequestResponseFile
152log4j2.appender.rr.type = RollingRandomAccessFile
153log4j2.appender.rr.fileName = ${logDirectory}/${requestResponseLogName}.log
154log4j2.appender.rr.filePattern = ${logDirectory}/${requestResponseLogName}.log.%i
155log4j2.appender.rr.immediateFlush = false
156log4j2.appender.rr.append = true
157log4j2.appender.rr.layout.type = PatternLayout
158log4j2.appender.rr.layout.pattern = %d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|%X{PartnerName}|%m%n
159log4j2.appender.rr.policies.type = Policies
160log4j2.appender.rr.policies.size.type = SizeBasedTriggeringPolicy
161log4j2.appender.rr.policies.size.size = 50MB
162log4j2.appender.rr.strategy.type = DefaultRolloverStrategy
163log4j2.appender.rr.strategy.max = 100
164log4j2.appender.rr.strategy.fileIndex = min
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000165
Smokowski, Kevin (ks6305)2e8a6ce2020-06-22 14:07:14 -0500166log4j2.appender.security.type = RollingRandomAccessFile
Sylvain Desbureauxbcf72512020-07-22 10:45:18 +0200167log4j2.appender.security.name = SecurityFile
Smokowski, Kevin (ks6305)2e8a6ce2020-06-22 14:07:14 -0500168log4j2.appender.security.fileName = ${logDirectory}/${securityLogName}.log
169log4j2.appender.security.filePattern = ${logDirectory}/${securityLogName}.log.%i
170log4j2.appender.security.append = true
171log4j2.appender.security.layout.type = PatternLayout
172log4j2.appender.security.layout.pattern = ${log4j2.pattern}
173log4j2.appender.security.policies.type = Policies
174log4j2.appender.security.policies.size.type = SizeBasedTriggeringPolicy
175log4j2.appender.security.policies.size.size = ${maxFileSize}
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000176
Smokowski, Kevin (ks6305)2e8a6ce2020-06-22 14:07:14 -0500177# Security audit logger
178log4j2.logger.security.name = org.apache.karaf.jaas.modules.audit
179log4j2.logger.security.level = INFO
180log4j2.logger.security.additivity = false
Sylvain Desbureauxbcf72512020-07-22 10:45:18 +0200181log4j2.logger.security.appenderRef.SecurityFile.ref = SecurityFile
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000182
183log4j2.logger.audit.name = org.onap.logging.filter.base.AbstractAuditLogFilter
184log4j2.logger.audit.level = INFO
185log4j2.logger.audit.additivity = false
186log4j2.logger.audit.appenderRef.AuditFile.ref = AuditFile
187
188log4j2.logger.metric.name = org.onap.ccsdk.sli.core.filters.metric
189log4j2.logger.metric.level = INFO
190log4j2.logger.metric.additivity = false
191log4j2.logger.metric.appenderRef.MetricFile.ref = MetricFile
192
193log4j2.logger.metric2.name = org.onap.logging.filter.base.AbstractBaseMetricLogFilter
194log4j2.logger.metric2.level = INFO
195log4j2.logger.metric2.additivity = false
196log4j2.logger.metric2.appenderRef.MetricFile.ref = MetricFile
197
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000198log4j2.logger.rr.name = org.onap.logging.filter.base.PayloadLoggingServletFilter
199log4j2.logger.rr.level = INFO
200log4j2.logger.rr.additivity = false
Smokowski, Kevin (ks6305)2e8a6ce2020-06-22 14:07:14 -0500201log4j2.logger.rr.appenderRef.RequestResponseFile.ref = RequestResponseFile