aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/sdnc/resources/config/log/org.ops4j.pax.logging.cfg
blob: 46c5db0ea946084bdb04f6fe09b35c4dc1c9db98 (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
################################################################################
#
#    Licensed to the Apache Software Foundation (ASF) under one or more
#    contributor license agreements.  See the NOTICE file distributed with
#    this work for additional information regarding copyright ownership.
#    The ASF licenses this file to You under the Apache License, Version 2.0
#    (the "License"); you may not use this file except in compliance with
#    the License.  You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS,
#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#    See the License for the specific language governing permissions and
#    limitations under the License.
#
################################################################################

# Properties used as default values in MDC
log4j2.property.ServiceName = INTERNAL
log4j2.property.ErrorCode = 900
log4j2.property.ErrorDesc = UnknownError


# Common properties
maxFileSize=100MB
maxBackupIndex=20
logDir=/var/log/onap
componentName=sdnc
logDirectory=${logDir}/${componentName}
karafLogName=karaf
errorLogName=error
metricsLogName=metrics
auditLogName=audit
debugLogName=debug

log4j2.rootLogger.appenderRef.KarafFile.ref = KarafFile
log4j2.rootLogger.appenderRef.PaxOsgi.ref = PaxOsgi
log4j2.rootLogger.appenderRef.Console.ref = Console
log4j2.rootLogger.appenderRef.DebugFile.ref = DebugFile
log4j2.rootLogger.appenderRef.ErrorFile.ref = ErrorFile
log4j2.rootLogger.appenderRef.Console.filter.threshold.type = ThresholdFilter
log4j2.rootLogger.appenderRef.Console.filter.threshold.level = ${karaf.log.console:-OFF}

log4j2.bundle.info = %X{bundle.id} - %.50X{bundle.name} - %X{bundle.version}
# Veracode: Address Improper Output Neutralization for Logs CWE ID 117 flaw
# \\R matches any new line character, any new line character will replaced with space (stripped)
log4j2.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | ${log4j2.bundle.info} | %X{currentGraph} - %X{nodeId}  | %replace{%m}{\\R}{ }%n

# Security audit logger
log4j2.logger.audit.name = org.apache.karaf.jaas.modules.audit
log4j2.logger.audit.level = INFO
log4j2.logger.audit.additivity = false
log4j2.logger.audit.appenderRef.AuditRollingFile.ref = AuditRollingFile

# Appenders configuration

# Console appender not used by default (see log4j2.rootLogger.appenderRefs)
log4j2.appender.console.type = Console
log4j2.appender.console.name = Console
log4j2.appender.console.layout.type = PatternLayout
log4j2.appender.console.layout.pattern = ${log4j2.pattern}

# OSGi appender
log4j2.appender.osgi.type = PaxOsgi
log4j2.appender.osgi.name = PaxOsgi
log4j2.appender.osgi.filter = *

# KarafFile appender
log4j2.appender.karaf.type = RollingRandomAccessFile
log4j2.appender.karaf.name = KarafFile
log4j2.appender.karaf.fileName = ${logDirectory}/log/karaf.log
log4j2.appender.karaf.filePattern = ${logDirectory}/log/karaf.log.%i
# uncomment to not force a disk flush
#log4j2.appender.karaf.immediateFlush = false
log4j2.appender.karaf.append = true
log4j2.appender.karaf.layout.type = PatternLayout
log4j2.appender.karaf.layout.pattern = ${log4j2.pattern}
log4j2.appender.karaf.policies.type = Policies
log4j2.appender.karaf.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.karaf.policies.size.size = ${maxFileSize}
log4j2.appender.karaf.strategy.type = DefaultRolloverStrategy
log4j2.appender.karaf.strategy.max = ${maxBackupIndex}
log4j2.appender.karaf.strategy.fileIndex = min
# Routing appender (log4j sift)
log4j2.appender.routing.type = Routing
log4j2.appender.routing.name = Routing
log4j2.appender.routing.routes.type = Routes
log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\}
log4j2.appender.routing.routes.bundle.type = Route
log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile
log4j2.appender.routing.routes.bundle.appender.name = Bundle-\$\\\{ctx:bundle.name\}
log4j2.appender.routing.routes.bundle.appender.fileName = ${logDirectory}/log/bundle-\$\\\{ctx:bundle.name\}.log
log4j2.appender.routing.routes.bundle.appender.filePattern= ${logDirectory}/log/bundle-\$\\\{ctx:bundle.name\}.log.%i
log4j2.appender.routing.routes.bundle.appender.append = true
log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout
log4j2.appender.routing.routes.bundle.appender.layout.pattern = ${log4j2.pattern}
log4j2.appender.routing.routes.bundle.appender.policies.type = Policies
log4j2.appender.routing.routes.bundle.appender.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.routing.routes.bundle.appender.policies.size.size = ${maxFileSize}

#ecomp logging standards
log4j2.appender.debug.type = RollingRandomAccessFile
log4j2.appender.debug.name = DebugFile
log4j2.appender.debug.fileName = <%= @logDir %>/debug.log
log4j2.appender.debug.filePattern = <%= @logDir %>/debug.log.%i
# uncomment to not force a disk flush
#log4j2.appender.debug.immediateFlush = false
log4j2.appender.debug.append = true
log4j2.appender.debug.layout.type = PatternLayout
log4j2.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
log4j2.appender.debug.policies.type = Policies
log4j2.appender.debug.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.debug.policies.size.size = ${maxFileSize}
log4j2.appender.debug.strategy.type = DefaultRolloverStrategy
log4j2.appender.debug.strategy.max = ${maxBackupIndex}
log4j2.appender.debug.strategy.fileIndex = min


log4j2.appender.error.type = RollingRandomAccessFile
log4j2.appender.error.name = ErrorFile
log4j2.appender.error.fileName = <%= @logDir %>/error.log
log4j2.appender.error.filePattern = <%= @logDir %>/error.log.%i
# uncomment to not force a disk flush
#log4j2.appender.error.immediateFlush = false
log4j2.appender.error.append = true
log4j2.appender.error.layout.type = PatternLayout
log4j2.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

log4j2.appender.error.policies.type = Policies
log4j2.appender.error.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.error.policies.size.size = ${maxFileSize}
log4j2.appender.error.strategy.type = DefaultRolloverStrategy
log4j2.appender.error.strategy.max = ${maxBackupIndex}
log4j2.appender.error.strategy.fileIndex = min
log4j2.appender.error.filter.threshold.type = ThresholdFilter
log4j2.appender.error.filter.threshold.level = WARN
log4j2.appender.error.filter.threshold.match = ACCEPT



log4j2.appender.metric.type = RollingRandomAccessFile
log4j2.appender.metric.name = MetricFile
log4j2.appender.metric.fileName = <%= @logDir %>/metric.log
log4j2.appender.metric.filePattern = <%= @logDir %>/metric.log.%i
# uncomment to not force a disk flush
#log4j2.appender.metric.immediateFlush = false
log4j2.appender.metric.append = true
log4j2.appender.metric.layout.type = PatternLayout
log4j2.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
log4j2.appender.metric.policies.type = Policies
log4j2.appender.metric.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.metric.policies.size.size = ${maxFileSize}
log4j2.appender.metric.strategy.type = DefaultRolloverStrategy
log4j2.appender.metric.strategy.max = 100
log4j2.appender.metric.strategy.fileIndex = min


log4j2.appender.audit.type = RollingRandomAccessFile
log4j2.appender.audit.name = AuditFile
log4j2.appender.audit.fileName = <%= @logDir %>/audit.log
log4j2.appender.audit.filePattern = <%= @logDir %>/audit.log.%i
# uncomment to not force a disk flush
#log4j2.appender.audit.immediateFlush = false
log4j2.appender.audit.append = true
log4j2.appender.audit.layout.type = PatternLayout
log4j2.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
log4j2.appender.audit.policies.type = Policies
log4j2.appender.audit.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.audit.policies.size.size = ${maxFileSize}
log4j2.appender.audit.strategy.type = DefaultRolloverStrategy
log4j2.appender.audit.strategy.max = ${maxBackupIndex}
log4j2.appender.audit.strategy.fileIndex = min

# Loggers

log4j2.logger.metric.name = org.onap.ccsdk.sli.core.filters.metric
log4j2.logger.metric.level = INFO
log4j2.logger.metric.additivity = false
log4j2.logger.metric.appenderRef.MetricFile.ref = MetricFile

log4j2.logger.metric2.name = org.onap.logging.filter.base.AbstractBaseMetricLogFilter
log4j2.logger.metric2.level = INFO
log4j2.logger.metric2.additivity = false
log4j2.logger.metric2.appenderRef.MetricFile.ref = MetricFile

log4j2.logger.audit.name = org.onap.logging.filter.base.AbstractAuditLogFilter
log4j2.logger.audit.level = INFO
log4j2.logger.audit.additivity = false
log4j2.logger.audit.appenderRef.AuditFile.ref = AuditFile

log4j2.logger.metric.name = org.onap.ccsdk.sli.core.filters.metric
log4j2.logger.metric.level = INFO
log4j2.logger.metric.additivity = false
log4j2.logger.metric.appenderRef.MetricFile.ref = MetricFile

log4j2.logger.metric2.name = org.onap.logging.filter.base.AbstractBaseMetricLogFilter
log4j2.logger.metric2.level = INFO
log4j2.logger.metric2.additivity = false
log4j2.logger.metric2.appenderRef.MetricFile.ref = MetricFile

log4j2.logger.audit.name = org.onap.logging.filter.base.AbstractAuditLogFilter
log4j2.logger.audit.level = INFO
log4j2.logger.audit.additivity = false
log4j2.logger.audit.appenderRef.AuditFile.ref = AuditFile

log4j2.logger.rr.name = org.onap.logging.filter.base.PayloadLoggingServletFilter
log4j2.logger.rr.level = INFO
log4j2.logger.rr.additivity = false
log4j2.logger.rr.appenderRef.RequestResponseFile.ref = RequestResponseFile