blob: 46c5db0ea946084bdb04f6fe09b35c4dc1c9db98 [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################################################################################
19
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +000020# Properties used as default values in MDC
21log4j2.property.ServiceName = INTERNAL
22log4j2.property.ErrorCode = 900
23log4j2.property.ErrorDesc = UnknownError
jmac065e2ce2018-03-29 01:18:02 +000024
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050025
26# Common properties
jmac065e2ce2018-03-29 01:18:02 +000027maxFileSize=100MB
28maxBackupIndex=20
29logDir=/var/log/onap
30componentName=sdnc
31logDirectory=${logDir}/${componentName}
32karafLogName=karaf
33errorLogName=error
34metricsLogName=metrics
35auditLogName=audit
36debugLogName=debug
37
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +000038log4j2.rootLogger.appenderRef.KarafFile.ref = KarafFile
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050039log4j2.rootLogger.appenderRef.PaxOsgi.ref = PaxOsgi
40log4j2.rootLogger.appenderRef.Console.ref = Console
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +000041log4j2.rootLogger.appenderRef.DebugFile.ref = DebugFile
42log4j2.rootLogger.appenderRef.ErrorFile.ref = ErrorFile
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050043log4j2.rootLogger.appenderRef.Console.filter.threshold.type = ThresholdFilter
44log4j2.rootLogger.appenderRef.Console.filter.threshold.level = ${karaf.log.console:-OFF}
jmac065e2ce2018-03-29 01:18:02 +000045
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +000046log4j2.bundle.info = %X{bundle.id} - %.50X{bundle.name} - %X{bundle.version}
47# Veracode: Address Improper Output Neutralization for Logs CWE ID 117 flaw
48# \\R matches any new line character, any new line character will replaced with space (stripped)
49log4j2.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | ${log4j2.bundle.info} | %X{currentGraph} - %X{nodeId} | %replace{%m}{\\R}{ }%n
jmac065e2ce2018-03-29 01:18:02 +000050
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050051# Security audit logger
52log4j2.logger.audit.name = org.apache.karaf.jaas.modules.audit
53log4j2.logger.audit.level = INFO
54log4j2.logger.audit.additivity = false
55log4j2.logger.audit.appenderRef.AuditRollingFile.ref = AuditRollingFile
jmac065e2ce2018-03-29 01:18:02 +000056
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050057# Appenders configuration
jmac065e2ce2018-03-29 01:18:02 +000058
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050059# Console appender not used by default (see log4j2.rootLogger.appenderRefs)
60log4j2.appender.console.type = Console
61log4j2.appender.console.name = Console
62log4j2.appender.console.layout.type = PatternLayout
63log4j2.appender.console.layout.pattern = ${log4j2.pattern}
jmac065e2ce2018-03-29 01:18:02 +000064
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050065# OSGi appender
66log4j2.appender.osgi.type = PaxOsgi
67log4j2.appender.osgi.name = PaxOsgi
68log4j2.appender.osgi.filter = *
jmac065e2ce2018-03-29 01:18:02 +000069
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +000070# KarafFile appender
71log4j2.appender.karaf.type = RollingRandomAccessFile
72log4j2.appender.karaf.name = KarafFile
73log4j2.appender.karaf.fileName = ${logDirectory}/log/karaf.log
74log4j2.appender.karaf.filePattern = ${logDirectory}/log/karaf.log.%i
75# uncomment to not force a disk flush
76#log4j2.appender.karaf.immediateFlush = false
77log4j2.appender.karaf.append = true
78log4j2.appender.karaf.layout.type = PatternLayout
79log4j2.appender.karaf.layout.pattern = ${log4j2.pattern}
80log4j2.appender.karaf.policies.type = Policies
81log4j2.appender.karaf.policies.size.type = SizeBasedTriggeringPolicy
82log4j2.appender.karaf.policies.size.size = ${maxFileSize}
83log4j2.appender.karaf.strategy.type = DefaultRolloverStrategy
84log4j2.appender.karaf.strategy.max = ${maxBackupIndex}
85log4j2.appender.karaf.strategy.fileIndex = min
86# Routing appender (log4j sift)
87log4j2.appender.routing.type = Routing
88log4j2.appender.routing.name = Routing
89log4j2.appender.routing.routes.type = Routes
90log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\}
91log4j2.appender.routing.routes.bundle.type = Route
92log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile
93log4j2.appender.routing.routes.bundle.appender.name = Bundle-\$\\\{ctx:bundle.name\}
94log4j2.appender.routing.routes.bundle.appender.fileName = ${logDirectory}/log/bundle-\$\\\{ctx:bundle.name\}.log
95log4j2.appender.routing.routes.bundle.appender.filePattern= ${logDirectory}/log/bundle-\$\\\{ctx:bundle.name\}.log.%i
96log4j2.appender.routing.routes.bundle.appender.append = true
97log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout
98log4j2.appender.routing.routes.bundle.appender.layout.pattern = ${log4j2.pattern}
99log4j2.appender.routing.routes.bundle.appender.policies.type = Policies
100log4j2.appender.routing.routes.bundle.appender.policies.size.type = SizeBasedTriggeringPolicy
101log4j2.appender.routing.routes.bundle.appender.policies.size.size = ${maxFileSize}
jmac065e2ce2018-03-29 01:18:02 +0000102
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000103#ecomp logging standards
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -0500104log4j2.appender.debug.type = RollingRandomAccessFile
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000105log4j2.appender.debug.name = DebugFile
106log4j2.appender.debug.fileName = <%= @logDir %>/debug.log
107log4j2.appender.debug.filePattern = <%= @logDir %>/debug.log.%i
108# uncomment to not force a disk flush
109#log4j2.appender.debug.immediateFlush = false
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -0500110log4j2.appender.debug.append = true
111log4j2.appender.debug.layout.type = PatternLayout
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000112log4j2.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 -0500113log4j2.appender.debug.policies.type = Policies
114log4j2.appender.debug.policies.size.type = SizeBasedTriggeringPolicy
115log4j2.appender.debug.policies.size.size = ${maxFileSize}
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000116log4j2.appender.debug.strategy.type = DefaultRolloverStrategy
117log4j2.appender.debug.strategy.max = ${maxBackupIndex}
118log4j2.appender.debug.strategy.fileIndex = min
jmac065e2ce2018-03-29 01:18:02 +0000119
120
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -0500121log4j2.appender.error.type = RollingRandomAccessFile
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000122log4j2.appender.error.name = ErrorFile
123log4j2.appender.error.fileName = <%= @logDir %>/error.log
124log4j2.appender.error.filePattern = <%= @logDir %>/error.log.%i
125# uncomment to not force a disk flush
126#log4j2.appender.error.immediateFlush = false
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -0500127log4j2.appender.error.append = true
128log4j2.appender.error.layout.type = PatternLayout
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000129log4j2.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
130
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -0500131log4j2.appender.error.policies.type = Policies
132log4j2.appender.error.policies.size.type = SizeBasedTriggeringPolicy
133log4j2.appender.error.policies.size.size = ${maxFileSize}
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000134log4j2.appender.error.strategy.type = DefaultRolloverStrategy
135log4j2.appender.error.strategy.max = ${maxBackupIndex}
136log4j2.appender.error.strategy.fileIndex = min
137log4j2.appender.error.filter.threshold.type = ThresholdFilter
138log4j2.appender.error.filter.threshold.level = WARN
139log4j2.appender.error.filter.threshold.match = ACCEPT
jmac065e2ce2018-03-29 01:18:02 +0000140
jmac065e2ce2018-03-29 01:18:02 +0000141
Smokowski, Kevin (ks6305)fec82e42020-06-03 20:28:15 +0000142
143log4j2.appender.metric.type = RollingRandomAccessFile
144log4j2.appender.metric.name = MetricFile
145log4j2.appender.metric.fileName = <%= @logDir %>/metric.log
146log4j2.appender.metric.filePattern = <%= @logDir %>/metric.log.%i
147# uncomment to not force a disk flush
148#log4j2.appender.metric.immediateFlush = false
149log4j2.appender.metric.append = true
150log4j2.appender.metric.layout.type = PatternLayout
151log4j2.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}|<%= @hostIP %>|%X{ElapsedTime}|<%= @hostFQDN %>|%X{ClientIPAddress}|%C{1}|||%X{TargetElement}|%X{slf4j.marker}|%X|%X{currentGraph} - %X{nodeId}|${log4j2.bundle.info}|%m%n
152log4j2.appender.metric.policies.type = Policies
153log4j2.appender.metric.policies.size.type = SizeBasedTriggeringPolicy
154log4j2.appender.metric.policies.size.size = ${maxFileSize}
155log4j2.appender.metric.strategy.type = DefaultRolloverStrategy
156log4j2.appender.metric.strategy.max = 100
157log4j2.appender.metric.strategy.fileIndex = min
158
159
160log4j2.appender.audit.type = RollingRandomAccessFile
161log4j2.appender.audit.name = AuditFile
162log4j2.appender.audit.fileName = <%= @logDir %>/audit.log
163log4j2.appender.audit.filePattern = <%= @logDir %>/audit.log.%i
164# uncomment to not force a disk flush
165#log4j2.appender.audit.immediateFlush = false
166log4j2.appender.audit.append = true
167log4j2.appender.audit.layout.type = PatternLayout
168log4j2.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}|<%= @hostIP %>|%X{ElapsedTime}|<%= @hostFQDN %>|%X{ClientIPAddress}|%C{1}|%X{AUDIT-Unused}|%X{AUDIT-ProcessKey}|%X{slf4j.marker}|%X|%X{currentGraph} - %X{nodeId}|${log4j2.bundle.info}|%m%n
169log4j2.appender.audit.policies.type = Policies
170log4j2.appender.audit.policies.size.type = SizeBasedTriggeringPolicy
171log4j2.appender.audit.policies.size.size = ${maxFileSize}
172log4j2.appender.audit.strategy.type = DefaultRolloverStrategy
173log4j2.appender.audit.strategy.max = ${maxBackupIndex}
174log4j2.appender.audit.strategy.fileIndex = min
175
176# Loggers
177
178log4j2.logger.metric.name = org.onap.ccsdk.sli.core.filters.metric
179log4j2.logger.metric.level = INFO
180log4j2.logger.metric.additivity = false
181log4j2.logger.metric.appenderRef.MetricFile.ref = MetricFile
182
183log4j2.logger.metric2.name = org.onap.logging.filter.base.AbstractBaseMetricLogFilter
184log4j2.logger.metric2.level = INFO
185log4j2.logger.metric2.additivity = false
186log4j2.logger.metric2.appenderRef.MetricFile.ref = MetricFile
187
188log4j2.logger.audit.name = org.onap.logging.filter.base.AbstractAuditLogFilter
189log4j2.logger.audit.level = INFO
190log4j2.logger.audit.additivity = false
191log4j2.logger.audit.appenderRef.AuditFile.ref = AuditFile
192
193log4j2.logger.metric.name = org.onap.ccsdk.sli.core.filters.metric
194log4j2.logger.metric.level = INFO
195log4j2.logger.metric.additivity = false
196log4j2.logger.metric.appenderRef.MetricFile.ref = MetricFile
197
198log4j2.logger.metric2.name = org.onap.logging.filter.base.AbstractBaseMetricLogFilter
199log4j2.logger.metric2.level = INFO
200log4j2.logger.metric2.additivity = false
201log4j2.logger.metric2.appenderRef.MetricFile.ref = MetricFile
202
203log4j2.logger.audit.name = org.onap.logging.filter.base.AbstractAuditLogFilter
204log4j2.logger.audit.level = INFO
205log4j2.logger.audit.additivity = false
206log4j2.logger.audit.appenderRef.AuditFile.ref = AuditFile
207
208log4j2.logger.rr.name = org.onap.logging.filter.base.PayloadLoggingServletFilter
209log4j2.logger.rr.level = INFO
210log4j2.logger.rr.additivity = false
211log4j2.logger.rr.appenderRef.RequestResponseFile.ref = RequestResponseFile