Jakub Latusek | e0e8ca7 | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 1 | {{/* |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 2 | ################################################################################ |
| 3 | # |
| 4 | # Licensed to the Apache Software Foundation (ASF) under one or more |
| 5 | # contributor license agreements. See the NOTICE file distributed with |
| 6 | # this work for additional information regarding copyright ownership. |
| 7 | # The ASF licenses this file to You under the Apache License, Version 2.0 |
| 8 | # (the "License"); you may not use this file except in compliance with |
| 9 | # the License. You may obtain a copy of the License at |
| 10 | # |
| 11 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | # |
| 13 | # Unless required by applicable law or agreed to in writing, software |
| 14 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | # See the License for the specific language governing permissions and |
| 17 | # limitations under the License. |
| 18 | # |
| 19 | ################################################################################ |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 20 | # Properties used as default values in MDC |
Jakub Latusek | e0e8ca7 | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 21 | */}} |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 22 | log4j2.property.ServiceName = INTERNAL |
| 23 | log4j2.property.ErrorCode = 900 |
| 24 | log4j2.property.ErrorDesc = UnknownError |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 25 | |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame] | 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 |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 33 | auditLogName=audit |
| 34 | debugLogName=debug |
Smokowski, Kevin (ks6305) | 2e8a6ce | 2020-06-22 14:07:14 -0500 | [diff] [blame] | 35 | errorLogName=error |
| 36 | metricsLogName=metric |
| 37 | requestResponseLogName=request-response |
| 38 | securityLogName=security |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 39 | |
Smokowski, Kevin (ks6305) | 2e8a6ce | 2020-06-22 14:07:14 -0500 | [diff] [blame] | 40 | log4j2.rootLogger.level = INFO |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 41 | log4j2.rootLogger.appenderRef.KarafFile.ref = KarafFile |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame] | 42 | log4j2.rootLogger.appenderRef.PaxOsgi.ref = PaxOsgi |
| 43 | log4j2.rootLogger.appenderRef.Console.ref = Console |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 44 | log4j2.rootLogger.appenderRef.DebugFile.ref = DebugFile |
| 45 | log4j2.rootLogger.appenderRef.ErrorFile.ref = ErrorFile |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame] | 46 | log4j2.rootLogger.appenderRef.Console.filter.threshold.type = ThresholdFilter |
Sylvain Desbureaux | bcf7251 | 2020-07-22 10:45:18 +0200 | [diff] [blame] | 47 | log4j2.rootLogger.appenderRef.Console.filter.threshold.level = ${env:KARAF_CONSOLE_LOG_LEVEL\:-OFF} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 48 | |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 49 | log4j2.bundle.info = %X{bundle.id} - %.50X{bundle.name} - %X{bundle.version} |
| 50 | # Veracode: Address Improper Output Neutralization for Logs CWE ID 117 flaw |
| 51 | # \\R matches any new line character, any new line character will replaced with space (stripped) |
| 52 | 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] | 53 | |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame] | 54 | # Appenders configuration |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame] | 55 | # Console appender not used by default (see log4j2.rootLogger.appenderRefs) |
| 56 | log4j2.appender.console.type = Console |
| 57 | log4j2.appender.console.name = Console |
| 58 | log4j2.appender.console.layout.type = PatternLayout |
| 59 | log4j2.appender.console.layout.pattern = ${log4j2.pattern} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 60 | |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame] | 61 | # OSGi appender |
| 62 | log4j2.appender.osgi.type = PaxOsgi |
| 63 | log4j2.appender.osgi.name = PaxOsgi |
| 64 | log4j2.appender.osgi.filter = * |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 65 | |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 66 | # KarafFile appender |
| 67 | log4j2.appender.karaf.type = RollingRandomAccessFile |
| 68 | log4j2.appender.karaf.name = KarafFile |
Smokowski, Kevin (ks6305) | 2e8a6ce | 2020-06-22 14:07:14 -0500 | [diff] [blame] | 69 | log4j2.appender.karaf.fileName = ${logDirectory}/${karafLogName}.log |
| 70 | log4j2.appender.karaf.filePattern = ${logDirectory}/${karafLogName}.log.%i |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 71 | # uncomment to not force a disk flush |
| 72 | #log4j2.appender.karaf.immediateFlush = false |
| 73 | log4j2.appender.karaf.append = true |
| 74 | log4j2.appender.karaf.layout.type = PatternLayout |
| 75 | log4j2.appender.karaf.layout.pattern = ${log4j2.pattern} |
| 76 | log4j2.appender.karaf.policies.type = Policies |
| 77 | log4j2.appender.karaf.policies.size.type = SizeBasedTriggeringPolicy |
| 78 | log4j2.appender.karaf.policies.size.size = ${maxFileSize} |
| 79 | log4j2.appender.karaf.strategy.type = DefaultRolloverStrategy |
| 80 | log4j2.appender.karaf.strategy.max = ${maxBackupIndex} |
| 81 | log4j2.appender.karaf.strategy.fileIndex = min |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 82 | |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 83 | #ecomp logging standards |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame] | 84 | log4j2.appender.debug.type = RollingRandomAccessFile |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 85 | log4j2.appender.debug.name = DebugFile |
Smokowski, Kevin (ks6305) | 2e8a6ce | 2020-06-22 14:07:14 -0500 | [diff] [blame] | 86 | log4j2.appender.debug.fileName = ${logDirectory}/${debugLogName}.log |
| 87 | log4j2.appender.debug.filePattern = ${logDirectory}/${debugLogName}.log.%i |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 88 | # uncomment to not force a disk flush |
| 89 | #log4j2.appender.debug.immediateFlush = false |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame] | 90 | log4j2.appender.debug.append = true |
| 91 | log4j2.appender.debug.layout.type = PatternLayout |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 92 | 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] | 93 | log4j2.appender.debug.policies.type = Policies |
| 94 | log4j2.appender.debug.policies.size.type = SizeBasedTriggeringPolicy |
| 95 | log4j2.appender.debug.policies.size.size = ${maxFileSize} |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 96 | log4j2.appender.debug.strategy.type = DefaultRolloverStrategy |
| 97 | log4j2.appender.debug.strategy.max = ${maxBackupIndex} |
| 98 | log4j2.appender.debug.strategy.fileIndex = min |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 99 | |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame] | 100 | log4j2.appender.error.type = RollingRandomAccessFile |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 101 | log4j2.appender.error.name = ErrorFile |
Smokowski, Kevin (ks6305) | 2e8a6ce | 2020-06-22 14:07:14 -0500 | [diff] [blame] | 102 | log4j2.appender.error.fileName = ${logDirectory}/${errorLogName}.log |
| 103 | log4j2.appender.error.filePattern = ${logDirectory}/${errorLogName}.log.%i |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 104 | # uncomment to not force a disk flush |
| 105 | #log4j2.appender.error.immediateFlush = false |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame] | 106 | log4j2.appender.error.append = true |
| 107 | log4j2.appender.error.layout.type = PatternLayout |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 108 | 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 |
| 109 | |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame] | 110 | log4j2.appender.error.policies.type = Policies |
| 111 | log4j2.appender.error.policies.size.type = SizeBasedTriggeringPolicy |
| 112 | log4j2.appender.error.policies.size.size = ${maxFileSize} |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 113 | log4j2.appender.error.strategy.type = DefaultRolloverStrategy |
| 114 | log4j2.appender.error.strategy.max = ${maxBackupIndex} |
| 115 | log4j2.appender.error.strategy.fileIndex = min |
| 116 | log4j2.appender.error.filter.threshold.type = ThresholdFilter |
| 117 | log4j2.appender.error.filter.threshold.level = WARN |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 118 | |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 119 | log4j2.appender.metric.type = RollingRandomAccessFile |
| 120 | log4j2.appender.metric.name = MetricFile |
Smokowski, Kevin (ks6305) | 2e8a6ce | 2020-06-22 14:07:14 -0500 | [diff] [blame] | 121 | log4j2.appender.metric.fileName = ${logDirectory}/${metricsLogName}.log |
| 122 | log4j2.appender.metric.filePattern = ${logDirectory}/${metricsLogName}.log.%i |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 123 | # uncomment to not force a disk flush |
| 124 | #log4j2.appender.metric.immediateFlush = false |
| 125 | log4j2.appender.metric.append = true |
| 126 | log4j2.appender.metric.layout.type = PatternLayout |
Smokowski, Kevin (ks6305) | 2e8a6ce | 2020-06-22 14:07:14 -0500 | [diff] [blame] | 127 | 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] | 128 | log4j2.appender.metric.policies.type = Policies |
| 129 | log4j2.appender.metric.policies.size.type = SizeBasedTriggeringPolicy |
| 130 | log4j2.appender.metric.policies.size.size = ${maxFileSize} |
| 131 | log4j2.appender.metric.strategy.type = DefaultRolloverStrategy |
| 132 | log4j2.appender.metric.strategy.max = 100 |
| 133 | log4j2.appender.metric.strategy.fileIndex = min |
| 134 | |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 135 | log4j2.appender.audit.type = RollingRandomAccessFile |
| 136 | log4j2.appender.audit.name = AuditFile |
Smokowski, Kevin (ks6305) | 2e8a6ce | 2020-06-22 14:07:14 -0500 | [diff] [blame] | 137 | log4j2.appender.audit.fileName = ${logDirectory}/${auditLogName}.log |
| 138 | log4j2.appender.audit.filePattern = ${logDirectory}/${auditLogName}.log.%i |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 139 | # uncomment to not force a disk flush |
| 140 | #log4j2.appender.audit.immediateFlush = false |
| 141 | log4j2.appender.audit.append = true |
| 142 | log4j2.appender.audit.layout.type = PatternLayout |
Smokowski, Kevin (ks6305) | 2e8a6ce | 2020-06-22 14:07:14 -0500 | [diff] [blame] | 143 | 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] | 144 | log4j2.appender.audit.policies.type = Policies |
| 145 | log4j2.appender.audit.policies.size.type = SizeBasedTriggeringPolicy |
| 146 | log4j2.appender.audit.policies.size.size = ${maxFileSize} |
| 147 | log4j2.appender.audit.strategy.type = DefaultRolloverStrategy |
| 148 | log4j2.appender.audit.strategy.max = ${maxBackupIndex} |
| 149 | log4j2.appender.audit.strategy.fileIndex = min |
| 150 | |
Smokowski, Kevin (ks6305) | 2e8a6ce | 2020-06-22 14:07:14 -0500 | [diff] [blame] | 151 | log4j2.appender.rr.name = RequestResponseFile |
| 152 | log4j2.appender.rr.type = RollingRandomAccessFile |
| 153 | log4j2.appender.rr.fileName = ${logDirectory}/${requestResponseLogName}.log |
| 154 | log4j2.appender.rr.filePattern = ${logDirectory}/${requestResponseLogName}.log.%i |
| 155 | log4j2.appender.rr.immediateFlush = false |
| 156 | log4j2.appender.rr.append = true |
| 157 | log4j2.appender.rr.layout.type = PatternLayout |
| 158 | log4j2.appender.rr.layout.pattern = %d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|%X{PartnerName}|%m%n |
| 159 | log4j2.appender.rr.policies.type = Policies |
| 160 | log4j2.appender.rr.policies.size.type = SizeBasedTriggeringPolicy |
| 161 | log4j2.appender.rr.policies.size.size = 50MB |
| 162 | log4j2.appender.rr.strategy.type = DefaultRolloverStrategy |
| 163 | log4j2.appender.rr.strategy.max = 100 |
| 164 | log4j2.appender.rr.strategy.fileIndex = min |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 165 | |
Smokowski, Kevin (ks6305) | 2e8a6ce | 2020-06-22 14:07:14 -0500 | [diff] [blame] | 166 | log4j2.appender.security.type = RollingRandomAccessFile |
Sylvain Desbureaux | bcf7251 | 2020-07-22 10:45:18 +0200 | [diff] [blame] | 167 | log4j2.appender.security.name = SecurityFile |
Smokowski, Kevin (ks6305) | 2e8a6ce | 2020-06-22 14:07:14 -0500 | [diff] [blame] | 168 | log4j2.appender.security.fileName = ${logDirectory}/${securityLogName}.log |
| 169 | log4j2.appender.security.filePattern = ${logDirectory}/${securityLogName}.log.%i |
| 170 | log4j2.appender.security.append = true |
| 171 | log4j2.appender.security.layout.type = PatternLayout |
| 172 | log4j2.appender.security.layout.pattern = ${log4j2.pattern} |
| 173 | log4j2.appender.security.policies.type = Policies |
| 174 | log4j2.appender.security.policies.size.type = SizeBasedTriggeringPolicy |
| 175 | log4j2.appender.security.policies.size.size = ${maxFileSize} |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 176 | |
Smokowski, Kevin (ks6305) | 2e8a6ce | 2020-06-22 14:07:14 -0500 | [diff] [blame] | 177 | # Security audit logger |
| 178 | log4j2.logger.security.name = org.apache.karaf.jaas.modules.audit |
| 179 | log4j2.logger.security.level = INFO |
| 180 | log4j2.logger.security.additivity = false |
Sylvain Desbureaux | bcf7251 | 2020-07-22 10:45:18 +0200 | [diff] [blame] | 181 | log4j2.logger.security.appenderRef.SecurityFile.ref = SecurityFile |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 182 | |
| 183 | log4j2.logger.audit.name = org.onap.logging.filter.base.AbstractAuditLogFilter |
| 184 | log4j2.logger.audit.level = INFO |
| 185 | log4j2.logger.audit.additivity = false |
| 186 | log4j2.logger.audit.appenderRef.AuditFile.ref = AuditFile |
| 187 | |
| 188 | log4j2.logger.metric.name = org.onap.ccsdk.sli.core.filters.metric |
| 189 | log4j2.logger.metric.level = INFO |
| 190 | log4j2.logger.metric.additivity = false |
| 191 | log4j2.logger.metric.appenderRef.MetricFile.ref = MetricFile |
| 192 | |
| 193 | log4j2.logger.metric2.name = org.onap.logging.filter.base.AbstractBaseMetricLogFilter |
| 194 | log4j2.logger.metric2.level = INFO |
| 195 | log4j2.logger.metric2.additivity = false |
| 196 | log4j2.logger.metric2.appenderRef.MetricFile.ref = MetricFile |
| 197 | |
Smokowski, Kevin (ks6305) | fec82e4 | 2020-06-03 20:28:15 +0000 | [diff] [blame] | 198 | log4j2.logger.rr.name = org.onap.logging.filter.base.PayloadLoggingServletFilter |
| 199 | log4j2.logger.rr.level = INFO |
| 200 | log4j2.logger.rr.additivity = false |
Smokowski, Kevin (ks6305) | 2e8a6ce | 2020-06-22 14:07:14 -0500 | [diff] [blame] | 201 | log4j2.logger.rr.appenderRef.RequestResponseFile.ref = RequestResponseFile |