blob: 8a608f081a0e668c4f03288e07961aa84a7f16e5 [file] [log] [blame]
jmac065e2ce2018-03-29 01:18:02 +00001################################################################################
2#
3# Licensed to the Apache Software Foundation (ASF) under one or more
4# contributor license agreements. See the NOTICE file distributed with
5# this work for additional information regarding copyright ownership.
6# The ASF licenses this file to You under the Apache License, Version 2.0
7# (the "License"); you may not use this file except in compliance with
8# the License. You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17#
18################################################################################
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +000019# Properties used as default values in MDC
20log4j2.property.ServiceName = INTERNAL
21log4j2.property.ErrorCode = 900
22log4j2.property.ErrorDesc = UnknownError
jmac065e2ce2018-03-29 01:18:02 +000023
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050024# Common properties
jmac065e2ce2018-03-29 01:18:02 +000025maxFileSize=100MB
26maxBackupIndex=20
27logDir=/var/log/onap
28componentName=sdnc
29logDirectory=${logDir}/${componentName}
30karafLogName=karaf
jmac065e2ce2018-03-29 01:18:02 +000031auditLogName=audit
32debugLogName=debug
Smokowski, Kevin (ks6305)2e8a6ce2020-06-22 14:07:14 -050033errorLogName=error
34metricsLogName=metric
35requestResponseLogName=request-response
36securityLogName=security
jmac065e2ce2018-03-29 01:18:02 +000037
Smokowski, Kevin (ks6305)2e8a6ce2020-06-22 14:07:14 -050038log4j2.rootLogger.level = INFO
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +000039log4j2.rootLogger.appenderRef.KarafFile.ref = KarafFile
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050040log4j2.rootLogger.appenderRef.PaxOsgi.ref = PaxOsgi
41log4j2.rootLogger.appenderRef.Console.ref = Console
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +000042log4j2.rootLogger.appenderRef.DebugFile.ref = DebugFile
43log4j2.rootLogger.appenderRef.ErrorFile.ref = ErrorFile
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050044log4j2.rootLogger.appenderRef.Console.filter.threshold.type = ThresholdFilter
Sylvain Desbureauxbcf72512020-07-22 10:45:18 +020045log4j2.rootLogger.appenderRef.Console.filter.threshold.level = ${env:KARAF_CONSOLE_LOG_LEVEL\:-OFF}
jmac065e2ce2018-03-29 01:18:02 +000046
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +000047log4j2.bundle.info = %X{bundle.id} - %.50X{bundle.name} - %X{bundle.version}
48# Veracode: Address Improper Output Neutralization for Logs CWE ID 117 flaw
49# \\R matches any new line character, any new line character will replaced with space (stripped)
50log4j2.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | ${log4j2.bundle.info} | %X{currentGraph} - %X{nodeId} | %replace{%m}{\\R}{ }%n
jmac065e2ce2018-03-29 01:18:02 +000051
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050052# Appenders configuration
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050053# Console appender not used by default (see log4j2.rootLogger.appenderRefs)
54log4j2.appender.console.type = Console
55log4j2.appender.console.name = Console
56log4j2.appender.console.layout.type = PatternLayout
57log4j2.appender.console.layout.pattern = ${log4j2.pattern}
jmac065e2ce2018-03-29 01:18:02 +000058
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050059# OSGi appender
60log4j2.appender.osgi.type = PaxOsgi
61log4j2.appender.osgi.name = PaxOsgi
62log4j2.appender.osgi.filter = *
jmac065e2ce2018-03-29 01:18:02 +000063
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +000064# KarafFile appender
65log4j2.appender.karaf.type = RollingRandomAccessFile
66log4j2.appender.karaf.name = KarafFile
Smokowski, Kevin (ks6305)2e8a6ce2020-06-22 14:07:14 -050067log4j2.appender.karaf.fileName = ${logDirectory}/${karafLogName}.log
68log4j2.appender.karaf.filePattern = ${logDirectory}/${karafLogName}.log.%i
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +000069# uncomment to not force a disk flush
70#log4j2.appender.karaf.immediateFlush = false
71log4j2.appender.karaf.append = true
72log4j2.appender.karaf.layout.type = PatternLayout
73log4j2.appender.karaf.layout.pattern = ${log4j2.pattern}
74log4j2.appender.karaf.policies.type = Policies
75log4j2.appender.karaf.policies.size.type = SizeBasedTriggeringPolicy
76log4j2.appender.karaf.policies.size.size = ${maxFileSize}
77log4j2.appender.karaf.strategy.type = DefaultRolloverStrategy
78log4j2.appender.karaf.strategy.max = ${maxBackupIndex}
79log4j2.appender.karaf.strategy.fileIndex = min
jmac065e2ce2018-03-29 01:18:02 +000080
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +000081#ecomp logging standards
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050082log4j2.appender.debug.type = RollingRandomAccessFile
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +000083log4j2.appender.debug.name = DebugFile
Smokowski, Kevin (ks6305)2e8a6ce2020-06-22 14:07:14 -050084log4j2.appender.debug.fileName = ${logDirectory}/${debugLogName}.log
85log4j2.appender.debug.filePattern = ${logDirectory}/${debugLogName}.log.%i
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +000086# uncomment to not force a disk flush
87#log4j2.appender.debug.immediateFlush = false
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050088log4j2.appender.debug.append = true
89log4j2.appender.debug.layout.type = PatternLayout
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +000090log4j2.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 -050091log4j2.appender.debug.policies.type = Policies
92log4j2.appender.debug.policies.size.type = SizeBasedTriggeringPolicy
93log4j2.appender.debug.policies.size.size = ${maxFileSize}
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +000094log4j2.appender.debug.strategy.type = DefaultRolloverStrategy
95log4j2.appender.debug.strategy.max = ${maxBackupIndex}
96log4j2.appender.debug.strategy.fileIndex = min
jmac065e2ce2018-03-29 01:18:02 +000097
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050098log4j2.appender.error.type = RollingRandomAccessFile
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +000099log4j2.appender.error.name = ErrorFile
Smokowski, Kevin (ks6305)2e8a6ce2020-06-22 14:07:14 -0500100log4j2.appender.error.fileName = ${logDirectory}/${errorLogName}.log
101log4j2.appender.error.filePattern = ${logDirectory}/${errorLogName}.log.%i
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000102# uncomment to not force a disk flush
103#log4j2.appender.error.immediateFlush = false
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -0500104log4j2.appender.error.append = true
105log4j2.appender.error.layout.type = PatternLayout
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000106log4j2.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
107
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -0500108log4j2.appender.error.policies.type = Policies
109log4j2.appender.error.policies.size.type = SizeBasedTriggeringPolicy
110log4j2.appender.error.policies.size.size = ${maxFileSize}
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000111log4j2.appender.error.strategy.type = DefaultRolloverStrategy
112log4j2.appender.error.strategy.max = ${maxBackupIndex}
113log4j2.appender.error.strategy.fileIndex = min
114log4j2.appender.error.filter.threshold.type = ThresholdFilter
115log4j2.appender.error.filter.threshold.level = WARN
jmac065e2ce2018-03-29 01:18:02 +0000116
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000117log4j2.appender.metric.type = RollingRandomAccessFile
118log4j2.appender.metric.name = MetricFile
Smokowski, Kevin (ks6305)2e8a6ce2020-06-22 14:07:14 -0500119log4j2.appender.metric.fileName = ${logDirectory}/${metricsLogName}.log
120log4j2.appender.metric.filePattern = ${logDirectory}/${metricsLogName}.log.%i
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000121# uncomment to not force a disk flush
122#log4j2.appender.metric.immediateFlush = false
123log4j2.appender.metric.append = true
124log4j2.appender.metric.layout.type = PatternLayout
Smokowski, Kevin (ks6305)2e8a6ce2020-06-22 14:07:14 -0500125log4j2.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 +0000126log4j2.appender.metric.policies.type = Policies
127log4j2.appender.metric.policies.size.type = SizeBasedTriggeringPolicy
128log4j2.appender.metric.policies.size.size = ${maxFileSize}
129log4j2.appender.metric.strategy.type = DefaultRolloverStrategy
130log4j2.appender.metric.strategy.max = 100
131log4j2.appender.metric.strategy.fileIndex = min
132
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000133log4j2.appender.audit.type = RollingRandomAccessFile
134log4j2.appender.audit.name = AuditFile
Smokowski, Kevin (ks6305)2e8a6ce2020-06-22 14:07:14 -0500135log4j2.appender.audit.fileName = ${logDirectory}/${auditLogName}.log
136log4j2.appender.audit.filePattern = ${logDirectory}/${auditLogName}.log.%i
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000137# uncomment to not force a disk flush
138#log4j2.appender.audit.immediateFlush = false
139log4j2.appender.audit.append = true
140log4j2.appender.audit.layout.type = PatternLayout
Smokowski, Kevin (ks6305)2e8a6ce2020-06-22 14:07:14 -0500141log4j2.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 +0000142log4j2.appender.audit.policies.type = Policies
143log4j2.appender.audit.policies.size.type = SizeBasedTriggeringPolicy
144log4j2.appender.audit.policies.size.size = ${maxFileSize}
145log4j2.appender.audit.strategy.type = DefaultRolloverStrategy
146log4j2.appender.audit.strategy.max = ${maxBackupIndex}
147log4j2.appender.audit.strategy.fileIndex = min
148
Smokowski, Kevin (ks6305)2e8a6ce2020-06-22 14:07:14 -0500149log4j2.appender.rr.name = RequestResponseFile
150log4j2.appender.rr.type = RollingRandomAccessFile
151log4j2.appender.rr.fileName = ${logDirectory}/${requestResponseLogName}.log
152log4j2.appender.rr.filePattern = ${logDirectory}/${requestResponseLogName}.log.%i
153log4j2.appender.rr.immediateFlush = false
154log4j2.appender.rr.append = true
155log4j2.appender.rr.layout.type = PatternLayout
156log4j2.appender.rr.layout.pattern = %d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|%X{PartnerName}|%m%n
157log4j2.appender.rr.policies.type = Policies
158log4j2.appender.rr.policies.size.type = SizeBasedTriggeringPolicy
159log4j2.appender.rr.policies.size.size = 50MB
160log4j2.appender.rr.strategy.type = DefaultRolloverStrategy
161log4j2.appender.rr.strategy.max = 100
162log4j2.appender.rr.strategy.fileIndex = min
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000163
Smokowski, Kevin (ks6305)2e8a6ce2020-06-22 14:07:14 -0500164log4j2.appender.security.type = RollingRandomAccessFile
Sylvain Desbureauxbcf72512020-07-22 10:45:18 +0200165log4j2.appender.security.name = SecurityFile
Smokowski, Kevin (ks6305)2e8a6ce2020-06-22 14:07:14 -0500166log4j2.appender.security.fileName = ${logDirectory}/${securityLogName}.log
167log4j2.appender.security.filePattern = ${logDirectory}/${securityLogName}.log.%i
168log4j2.appender.security.append = true
169log4j2.appender.security.layout.type = PatternLayout
170log4j2.appender.security.layout.pattern = ${log4j2.pattern}
171log4j2.appender.security.policies.type = Policies
172log4j2.appender.security.policies.size.type = SizeBasedTriggeringPolicy
173log4j2.appender.security.policies.size.size = ${maxFileSize}
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000174
Smokowski, Kevin (ks6305)2e8a6ce2020-06-22 14:07:14 -0500175# Security audit logger
176log4j2.logger.security.name = org.apache.karaf.jaas.modules.audit
177log4j2.logger.security.level = INFO
178log4j2.logger.security.additivity = false
Sylvain Desbureauxbcf72512020-07-22 10:45:18 +0200179log4j2.logger.security.appenderRef.SecurityFile.ref = SecurityFile
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000180
181log4j2.logger.audit.name = org.onap.logging.filter.base.AbstractAuditLogFilter
182log4j2.logger.audit.level = INFO
183log4j2.logger.audit.additivity = false
184log4j2.logger.audit.appenderRef.AuditFile.ref = AuditFile
185
186log4j2.logger.metric.name = org.onap.ccsdk.sli.core.filters.metric
187log4j2.logger.metric.level = INFO
188log4j2.logger.metric.additivity = false
189log4j2.logger.metric.appenderRef.MetricFile.ref = MetricFile
190
191log4j2.logger.metric2.name = org.onap.logging.filter.base.AbstractBaseMetricLogFilter
192log4j2.logger.metric2.level = INFO
193log4j2.logger.metric2.additivity = false
194log4j2.logger.metric2.appenderRef.MetricFile.ref = MetricFile
195
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000196log4j2.logger.rr.name = org.onap.logging.filter.base.PayloadLoggingServletFilter
197log4j2.logger.rr.level = INFO
198log4j2.logger.rr.additivity = false
Smokowski, Kevin (ks6305)2e8a6ce2020-06-22 14:07:14 -0500199log4j2.logger.rr.appenderRef.RequestResponseFile.ref = RequestResponseFile