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