jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 1 | ################################################################################ |
| 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) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame^] | 20 | # Properties used as default values in MDC |
| 21 | log4j2.property.ServiceName = INTERNAL |
| 22 | log4j2.property.ErrorCode = 900 |
| 23 | log4j2.property.ErrorDesc = UnknownError |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 24 | |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame] | 25 | |
| 26 | # Common properties |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 27 | maxFileSize=100MB |
| 28 | maxBackupIndex=20 |
| 29 | logDir=/var/log/onap |
| 30 | componentName=sdnc |
| 31 | logDirectory=${logDir}/${componentName} |
| 32 | karafLogName=karaf |
| 33 | errorLogName=error |
| 34 | metricsLogName=metrics |
| 35 | auditLogName=audit |
| 36 | debugLogName=debug |
| 37 | |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame^] | 38 | log4j2.rootLogger.appenderRef.KarafFile.ref = KarafFile |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame] | 39 | log4j2.rootLogger.appenderRef.PaxOsgi.ref = PaxOsgi |
| 40 | log4j2.rootLogger.appenderRef.Console.ref = Console |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame^] | 41 | log4j2.rootLogger.appenderRef.DebugFile.ref = DebugFile |
| 42 | log4j2.rootLogger.appenderRef.ErrorFile.ref = ErrorFile |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame] | 43 | log4j2.rootLogger.appenderRef.Console.filter.threshold.type = ThresholdFilter |
| 44 | log4j2.rootLogger.appenderRef.Console.filter.threshold.level = ${karaf.log.console:-OFF} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 45 | |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame^] | 46 | log4j2.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) |
| 49 | log4j2.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | ${log4j2.bundle.info} | %X{currentGraph} - %X{nodeId} | %replace{%m}{\\R}{ }%n |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 50 | |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame] | 51 | # Security audit logger |
| 52 | log4j2.logger.audit.name = org.apache.karaf.jaas.modules.audit |
| 53 | log4j2.logger.audit.level = INFO |
| 54 | log4j2.logger.audit.additivity = false |
| 55 | log4j2.logger.audit.appenderRef.AuditRollingFile.ref = AuditRollingFile |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 56 | |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame] | 57 | # Appenders configuration |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 58 | |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame] | 59 | # Console appender not used by default (see log4j2.rootLogger.appenderRefs) |
| 60 | log4j2.appender.console.type = Console |
| 61 | log4j2.appender.console.name = Console |
| 62 | log4j2.appender.console.layout.type = PatternLayout |
| 63 | log4j2.appender.console.layout.pattern = ${log4j2.pattern} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 64 | |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame] | 65 | # OSGi appender |
| 66 | log4j2.appender.osgi.type = PaxOsgi |
| 67 | log4j2.appender.osgi.name = PaxOsgi |
| 68 | log4j2.appender.osgi.filter = * |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 69 | |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame^] | 70 | # KarafFile appender |
| 71 | log4j2.appender.karaf.type = RollingRandomAccessFile |
| 72 | log4j2.appender.karaf.name = KarafFile |
| 73 | log4j2.appender.karaf.fileName = ${logDirectory}/log/karaf.log |
| 74 | log4j2.appender.karaf.filePattern = ${logDirectory}/log/karaf.log.%i |
| 75 | # uncomment to not force a disk flush |
| 76 | #log4j2.appender.karaf.immediateFlush = false |
| 77 | log4j2.appender.karaf.append = true |
| 78 | log4j2.appender.karaf.layout.type = PatternLayout |
| 79 | log4j2.appender.karaf.layout.pattern = ${log4j2.pattern} |
| 80 | log4j2.appender.karaf.policies.type = Policies |
| 81 | log4j2.appender.karaf.policies.size.type = SizeBasedTriggeringPolicy |
| 82 | log4j2.appender.karaf.policies.size.size = ${maxFileSize} |
| 83 | log4j2.appender.karaf.strategy.type = DefaultRolloverStrategy |
| 84 | log4j2.appender.karaf.strategy.max = ${maxBackupIndex} |
| 85 | log4j2.appender.karaf.strategy.fileIndex = min |
| 86 | # Routing appender (log4j sift) |
| 87 | log4j2.appender.routing.type = Routing |
| 88 | log4j2.appender.routing.name = Routing |
| 89 | log4j2.appender.routing.routes.type = Routes |
| 90 | log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} |
| 91 | log4j2.appender.routing.routes.bundle.type = Route |
| 92 | log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile |
| 93 | log4j2.appender.routing.routes.bundle.appender.name = Bundle-\$\\\{ctx:bundle.name\} |
| 94 | log4j2.appender.routing.routes.bundle.appender.fileName = ${logDirectory}/log/bundle-\$\\\{ctx:bundle.name\}.log |
| 95 | log4j2.appender.routing.routes.bundle.appender.filePattern= ${logDirectory}/log/bundle-\$\\\{ctx:bundle.name\}.log.%i |
| 96 | log4j2.appender.routing.routes.bundle.appender.append = true |
| 97 | log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout |
| 98 | log4j2.appender.routing.routes.bundle.appender.layout.pattern = ${log4j2.pattern} |
| 99 | log4j2.appender.routing.routes.bundle.appender.policies.type = Policies |
| 100 | log4j2.appender.routing.routes.bundle.appender.policies.size.type = SizeBasedTriggeringPolicy |
| 101 | log4j2.appender.routing.routes.bundle.appender.policies.size.size = ${maxFileSize} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 102 | |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame^] | 103 | #ecomp logging standards |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame] | 104 | log4j2.appender.debug.type = RollingRandomAccessFile |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame^] | 105 | log4j2.appender.debug.name = DebugFile |
| 106 | log4j2.appender.debug.fileName = <%= @logDir %>/debug.log |
| 107 | log4j2.appender.debug.filePattern = <%= @logDir %>/debug.log.%i |
| 108 | # uncomment to not force a disk flush |
| 109 | #log4j2.appender.debug.immediateFlush = false |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame] | 110 | log4j2.appender.debug.append = true |
| 111 | log4j2.appender.debug.layout.type = PatternLayout |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame^] | 112 | 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 |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame] | 113 | log4j2.appender.debug.policies.type = Policies |
| 114 | log4j2.appender.debug.policies.size.type = SizeBasedTriggeringPolicy |
| 115 | log4j2.appender.debug.policies.size.size = ${maxFileSize} |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame^] | 116 | log4j2.appender.debug.strategy.type = DefaultRolloverStrategy |
| 117 | log4j2.appender.debug.strategy.max = ${maxBackupIndex} |
| 118 | log4j2.appender.debug.strategy.fileIndex = min |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 119 | |
| 120 | |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame] | 121 | log4j2.appender.error.type = RollingRandomAccessFile |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame^] | 122 | log4j2.appender.error.name = ErrorFile |
| 123 | log4j2.appender.error.fileName = <%= @logDir %>/error.log |
| 124 | log4j2.appender.error.filePattern = <%= @logDir %>/error.log.%i |
| 125 | # uncomment to not force a disk flush |
| 126 | #log4j2.appender.error.immediateFlush = false |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame] | 127 | log4j2.appender.error.append = true |
| 128 | log4j2.appender.error.layout.type = PatternLayout |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame^] | 129 | 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 |
| 130 | |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame] | 131 | log4j2.appender.error.policies.type = Policies |
| 132 | log4j2.appender.error.policies.size.type = SizeBasedTriggeringPolicy |
| 133 | log4j2.appender.error.policies.size.size = ${maxFileSize} |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame^] | 134 | log4j2.appender.error.strategy.type = DefaultRolloverStrategy |
| 135 | log4j2.appender.error.strategy.max = ${maxBackupIndex} |
| 136 | log4j2.appender.error.strategy.fileIndex = min |
| 137 | log4j2.appender.error.filter.threshold.type = ThresholdFilter |
| 138 | log4j2.appender.error.filter.threshold.level = WARN |
| 139 | log4j2.appender.error.filter.threshold.match = ACCEPT |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 140 | |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 141 | |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame^] | 142 | |
| 143 | log4j2.appender.metric.type = RollingRandomAccessFile |
| 144 | log4j2.appender.metric.name = MetricFile |
| 145 | log4j2.appender.metric.fileName = <%= @logDir %>/metric.log |
| 146 | log4j2.appender.metric.filePattern = <%= @logDir %>/metric.log.%i |
| 147 | # uncomment to not force a disk flush |
| 148 | #log4j2.appender.metric.immediateFlush = false |
| 149 | log4j2.appender.metric.append = true |
| 150 | log4j2.appender.metric.layout.type = PatternLayout |
| 151 | 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 |
| 152 | log4j2.appender.metric.policies.type = Policies |
| 153 | log4j2.appender.metric.policies.size.type = SizeBasedTriggeringPolicy |
| 154 | log4j2.appender.metric.policies.size.size = ${maxFileSize} |
| 155 | log4j2.appender.metric.strategy.type = DefaultRolloverStrategy |
| 156 | log4j2.appender.metric.strategy.max = 100 |
| 157 | log4j2.appender.metric.strategy.fileIndex = min |
| 158 | |
| 159 | |
| 160 | log4j2.appender.audit.type = RollingRandomAccessFile |
| 161 | log4j2.appender.audit.name = AuditFile |
| 162 | log4j2.appender.audit.fileName = <%= @logDir %>/audit.log |
| 163 | log4j2.appender.audit.filePattern = <%= @logDir %>/audit.log.%i |
| 164 | # uncomment to not force a disk flush |
| 165 | #log4j2.appender.audit.immediateFlush = false |
| 166 | log4j2.appender.audit.append = true |
| 167 | log4j2.appender.audit.layout.type = PatternLayout |
| 168 | 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 |
| 169 | log4j2.appender.audit.policies.type = Policies |
| 170 | log4j2.appender.audit.policies.size.type = SizeBasedTriggeringPolicy |
| 171 | log4j2.appender.audit.policies.size.size = ${maxFileSize} |
| 172 | log4j2.appender.audit.strategy.type = DefaultRolloverStrategy |
| 173 | log4j2.appender.audit.strategy.max = ${maxBackupIndex} |
| 174 | log4j2.appender.audit.strategy.fileIndex = min |
| 175 | |
| 176 | # Loggers |
| 177 | |
| 178 | log4j2.logger.metric.name = org.onap.ccsdk.sli.core.filters.metric |
| 179 | log4j2.logger.metric.level = INFO |
| 180 | log4j2.logger.metric.additivity = false |
| 181 | log4j2.logger.metric.appenderRef.MetricFile.ref = MetricFile |
| 182 | |
| 183 | log4j2.logger.metric2.name = org.onap.logging.filter.base.AbstractBaseMetricLogFilter |
| 184 | log4j2.logger.metric2.level = INFO |
| 185 | log4j2.logger.metric2.additivity = false |
| 186 | log4j2.logger.metric2.appenderRef.MetricFile.ref = MetricFile |
| 187 | |
| 188 | log4j2.logger.audit.name = org.onap.logging.filter.base.AbstractAuditLogFilter |
| 189 | log4j2.logger.audit.level = INFO |
| 190 | log4j2.logger.audit.additivity = false |
| 191 | log4j2.logger.audit.appenderRef.AuditFile.ref = AuditFile |
| 192 | |
| 193 | log4j2.logger.metric.name = org.onap.ccsdk.sli.core.filters.metric |
| 194 | log4j2.logger.metric.level = INFO |
| 195 | log4j2.logger.metric.additivity = false |
| 196 | log4j2.logger.metric.appenderRef.MetricFile.ref = MetricFile |
| 197 | |
| 198 | log4j2.logger.metric2.name = org.onap.logging.filter.base.AbstractBaseMetricLogFilter |
| 199 | log4j2.logger.metric2.level = INFO |
| 200 | log4j2.logger.metric2.additivity = false |
| 201 | log4j2.logger.metric2.appenderRef.MetricFile.ref = MetricFile |
| 202 | |
| 203 | log4j2.logger.audit.name = org.onap.logging.filter.base.AbstractAuditLogFilter |
| 204 | log4j2.logger.audit.level = INFO |
| 205 | log4j2.logger.audit.additivity = false |
| 206 | log4j2.logger.audit.appenderRef.AuditFile.ref = AuditFile |
| 207 | |
| 208 | log4j2.logger.rr.name = org.onap.logging.filter.base.PayloadLoggingServletFilter |
| 209 | log4j2.logger.rr.level = INFO |
| 210 | log4j2.logger.rr.additivity = false |
| 211 | log4j2.logger.rr.appenderRef.RequestResponseFile.ref = RequestResponseFile |