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 |
Sylvain Desbureaux | bcf7251 | 2020-07-22 10:45:18 +0200 | [diff] [blame] | 45 | log4j2.rootLogger.appenderRef.Console.filter.threshold.level = ${env:KARAF_CONSOLE_LOG_LEVEL\:-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 |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 116 | |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 117 | log4j2.appender.metric.type = RollingRandomAccessFile |
| 118 | log4j2.appender.metric.name = MetricFile |
Smokowski, Kevin (ks6305) | 2e8a6ce | 2020-06-22 14:07:14 -0500 | [diff] [blame] | 119 | log4j2.appender.metric.fileName = ${logDirectory}/${metricsLogName}.log |
| 120 | log4j2.appender.metric.filePattern = ${logDirectory}/${metricsLogName}.log.%i |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 121 | # uncomment to not force a disk flush |
| 122 | #log4j2.appender.metric.immediateFlush = false |
| 123 | log4j2.appender.metric.append = true |
| 124 | log4j2.appender.metric.layout.type = PatternLayout |
Smokowski, Kevin (ks6305) | 2e8a6ce | 2020-06-22 14:07:14 -0500 | [diff] [blame] | 125 | 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] | 126 | log4j2.appender.metric.policies.type = Policies |
| 127 | log4j2.appender.metric.policies.size.type = SizeBasedTriggeringPolicy |
| 128 | log4j2.appender.metric.policies.size.size = ${maxFileSize} |
| 129 | log4j2.appender.metric.strategy.type = DefaultRolloverStrategy |
| 130 | log4j2.appender.metric.strategy.max = 100 |
| 131 | log4j2.appender.metric.strategy.fileIndex = min |
| 132 | |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 133 | log4j2.appender.audit.type = RollingRandomAccessFile |
| 134 | log4j2.appender.audit.name = AuditFile |
Smokowski, Kevin (ks6305) | 2e8a6ce | 2020-06-22 14:07:14 -0500 | [diff] [blame] | 135 | log4j2.appender.audit.fileName = ${logDirectory}/${auditLogName}.log |
| 136 | log4j2.appender.audit.filePattern = ${logDirectory}/${auditLogName}.log.%i |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 137 | # uncomment to not force a disk flush |
| 138 | #log4j2.appender.audit.immediateFlush = false |
| 139 | log4j2.appender.audit.append = true |
| 140 | log4j2.appender.audit.layout.type = PatternLayout |
Smokowski, Kevin (ks6305) | 2e8a6ce | 2020-06-22 14:07:14 -0500 | [diff] [blame] | 141 | 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] | 142 | log4j2.appender.audit.policies.type = Policies |
| 143 | log4j2.appender.audit.policies.size.type = SizeBasedTriggeringPolicy |
| 144 | log4j2.appender.audit.policies.size.size = ${maxFileSize} |
| 145 | log4j2.appender.audit.strategy.type = DefaultRolloverStrategy |
| 146 | log4j2.appender.audit.strategy.max = ${maxBackupIndex} |
| 147 | log4j2.appender.audit.strategy.fileIndex = min |
| 148 | |
Smokowski, Kevin (ks6305) | 2e8a6ce | 2020-06-22 14:07:14 -0500 | [diff] [blame] | 149 | log4j2.appender.rr.name = RequestResponseFile |
| 150 | log4j2.appender.rr.type = RollingRandomAccessFile |
| 151 | log4j2.appender.rr.fileName = ${logDirectory}/${requestResponseLogName}.log |
| 152 | log4j2.appender.rr.filePattern = ${logDirectory}/${requestResponseLogName}.log.%i |
| 153 | log4j2.appender.rr.immediateFlush = false |
| 154 | log4j2.appender.rr.append = true |
| 155 | log4j2.appender.rr.layout.type = PatternLayout |
| 156 | log4j2.appender.rr.layout.pattern = %d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|%X{PartnerName}|%m%n |
| 157 | log4j2.appender.rr.policies.type = Policies |
| 158 | log4j2.appender.rr.policies.size.type = SizeBasedTriggeringPolicy |
| 159 | log4j2.appender.rr.policies.size.size = 50MB |
| 160 | log4j2.appender.rr.strategy.type = DefaultRolloverStrategy |
| 161 | log4j2.appender.rr.strategy.max = 100 |
| 162 | log4j2.appender.rr.strategy.fileIndex = min |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 163 | |
Smokowski, Kevin (ks6305) | 2e8a6ce | 2020-06-22 14:07:14 -0500 | [diff] [blame] | 164 | log4j2.appender.security.type = RollingRandomAccessFile |
Sylvain Desbureaux | bcf7251 | 2020-07-22 10:45:18 +0200 | [diff] [blame] | 165 | log4j2.appender.security.name = SecurityFile |
Smokowski, Kevin (ks6305) | 2e8a6ce | 2020-06-22 14:07:14 -0500 | [diff] [blame] | 166 | log4j2.appender.security.fileName = ${logDirectory}/${securityLogName}.log |
| 167 | log4j2.appender.security.filePattern = ${logDirectory}/${securityLogName}.log.%i |
| 168 | log4j2.appender.security.append = true |
| 169 | log4j2.appender.security.layout.type = PatternLayout |
| 170 | log4j2.appender.security.layout.pattern = ${log4j2.pattern} |
| 171 | log4j2.appender.security.policies.type = Policies |
| 172 | log4j2.appender.security.policies.size.type = SizeBasedTriggeringPolicy |
| 173 | log4j2.appender.security.policies.size.size = ${maxFileSize} |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 174 | |
Smokowski, Kevin (ks6305) | 2e8a6ce | 2020-06-22 14:07:14 -0500 | [diff] [blame] | 175 | # Security audit logger |
| 176 | log4j2.logger.security.name = org.apache.karaf.jaas.modules.audit |
| 177 | log4j2.logger.security.level = INFO |
| 178 | log4j2.logger.security.additivity = false |
Sylvain Desbureaux | bcf7251 | 2020-07-22 10:45:18 +0200 | [diff] [blame] | 179 | log4j2.logger.security.appenderRef.SecurityFile.ref = SecurityFile |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 180 | |
| 181 | log4j2.logger.audit.name = org.onap.logging.filter.base.AbstractAuditLogFilter |
| 182 | log4j2.logger.audit.level = INFO |
| 183 | log4j2.logger.audit.additivity = false |
| 184 | log4j2.logger.audit.appenderRef.AuditFile.ref = AuditFile |
| 185 | |
| 186 | log4j2.logger.metric.name = org.onap.ccsdk.sli.core.filters.metric |
| 187 | log4j2.logger.metric.level = INFO |
| 188 | log4j2.logger.metric.additivity = false |
| 189 | log4j2.logger.metric.appenderRef.MetricFile.ref = MetricFile |
| 190 | |
| 191 | log4j2.logger.metric2.name = org.onap.logging.filter.base.AbstractBaseMetricLogFilter |
| 192 | log4j2.logger.metric2.level = INFO |
| 193 | log4j2.logger.metric2.additivity = false |
| 194 | log4j2.logger.metric2.appenderRef.MetricFile.ref = MetricFile |
| 195 | |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 196 | log4j2.logger.rr.name = org.onap.logging.filter.base.PayloadLoggingServletFilter |
| 197 | log4j2.logger.rr.level = INFO |
| 198 | log4j2.logger.rr.additivity = false |
Smokowski, Kevin (ks6305) | 2e8a6ce | 2020-06-22 14:07:14 -0500 | [diff] [blame] | 199 | log4j2.logger.rr.appenderRef.RequestResponseFile.ref = RequestResponseFile |