| ################################################################################ |
| # |
| # 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 |
| auditLogName=audit |
| debugLogName=debug |
| errorLogName=error |
| metricsLogName=metric |
| requestResponseLogName=request-response |
| securityLogName=security |
| |
| log4j2.rootLogger.level = INFO |
| 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 |
| |
| # 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}/${karafLogName}.log |
| log4j2.appender.karaf.filePattern = ${logDirectory}/${karafLogName}.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 |
| |
| #ecomp logging standards |
| log4j2.appender.debug.type = RollingRandomAccessFile |
| log4j2.appender.debug.name = DebugFile |
| log4j2.appender.debug.fileName = ${logDirectory}/${debugLogName}.log |
| log4j2.appender.debug.filePattern = ${logDirectory}/${debugLogName}.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 = ${logDirectory}/${errorLogName}.log |
| log4j2.appender.error.filePattern = ${logDirectory}/${errorLogName}.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 = ${logDirectory}/${metricsLogName}.log |
| log4j2.appender.metric.filePattern = ${logDirectory}/${metricsLogName}.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}|%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 |
| 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 = ${logDirectory}/${auditLogName}.log |
| log4j2.appender.audit.filePattern = ${logDirectory}/${auditLogName}.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}|%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 |
| 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 |
| |
| log4j2.appender.rr.name = RequestResponseFile |
| log4j2.appender.rr.type = RollingRandomAccessFile |
| log4j2.appender.rr.fileName = ${logDirectory}/${requestResponseLogName}.log |
| log4j2.appender.rr.filePattern = ${logDirectory}/${requestResponseLogName}.log.%i |
| log4j2.appender.rr.immediateFlush = false |
| log4j2.appender.rr.append = true |
| log4j2.appender.rr.layout.type = PatternLayout |
| log4j2.appender.rr.layout.pattern = %d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|%X{PartnerName}|%m%n |
| log4j2.appender.rr.policies.type = Policies |
| log4j2.appender.rr.policies.size.type = SizeBasedTriggeringPolicy |
| log4j2.appender.rr.policies.size.size = 50MB |
| log4j2.appender.rr.strategy.type = DefaultRolloverStrategy |
| log4j2.appender.rr.strategy.max = 100 |
| log4j2.appender.rr.strategy.fileIndex = min |
| |
| log4j2.appender.security.type = RollingRandomAccessFile |
| log4j2.appender.security.name = securityRollingFile |
| log4j2.appender.security.fileName = ${logDirectory}/${securityLogName}.log |
| log4j2.appender.security.filePattern = ${logDirectory}/${securityLogName}.log.%i |
| log4j2.appender.security.append = true |
| log4j2.appender.security.layout.type = PatternLayout |
| log4j2.appender.security.layout.pattern = ${log4j2.pattern} |
| log4j2.appender.security.policies.type = Policies |
| log4j2.appender.security.policies.size.type = SizeBasedTriggeringPolicy |
| log4j2.appender.security.policies.size.size = ${maxFileSize} |
| |
| # Security audit logger |
| log4j2.logger.security.name = org.apache.karaf.jaas.modules.audit |
| log4j2.logger.security.level = INFO |
| log4j2.logger.security.additivity = false |
| log4j2.logger.security.appenderRef.AuditRollingFile.ref = AuditRollingFile |
| |
| 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.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 |