aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBorislav Glozman <Borislav.Glozman@amdocs.com>2020-06-07 11:51:46 +0000
committerGerrit Code Review <gerrit@onap.org>2020-06-07 11:51:46 +0000
commitb821fd3b8e10698152900e916ffbd3ee1a2ccdee (patch)
tree4bc46c5bb4e55cd660b789f6f47ce8a3359ca49d
parenta0aae63297e64016db2a441c23240849ebf4f2f2 (diff)
parentfec82e4a28267536bc88af305e44b90cec5d1482 (diff)
Merge "sdnc update"
-rw-r--r--kubernetes/sdnc/resources/config/log/org.ops4j.pax.logging.cfg199
1 files changed, 136 insertions, 63 deletions
diff --git a/kubernetes/sdnc/resources/config/log/org.ops4j.pax.logging.cfg b/kubernetes/sdnc/resources/config/log/org.ops4j.pax.logging.cfg
index 117a663dd4..46c5db0ea9 100644
--- a/kubernetes/sdnc/resources/config/log/org.ops4j.pax.logging.cfg
+++ b/kubernetes/sdnc/resources/config/log/org.ops4j.pax.logging.cfg
@@ -17,8 +17,10 @@
#
################################################################################
-# Common pattern layout for appenders
-log4j2.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %X{currentGraph} - %X{nodeId} | %m%n
+# Properties used as default values in MDC
+log4j2.property.ServiceName = INTERNAL
+log4j2.property.ErrorCode = 900
+log4j2.property.ErrorDesc = UnknownError
# Common properties
@@ -33,23 +35,18 @@ metricsLogName=metrics
auditLogName=audit
debugLogName=debug
-
-# Root logger
-log4j2.rootLogger.level = INFO
-# uncomment to use asynchronous loggers, which require mvn:com.lmax/disruptor/3.3.2 library
-#log4j2.rootLogger.type = asyncRoot
-#log4j2.rootLogger.includeLocation = false
-log4j2.rootLogger.appenderRef.RollingFile.ref = RollingFile
+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}
-# Loggers configuration
-
-# Spifly logger
-log4j2.logger.spifly.name = org.apache.aries.spifly
-log4j2.logger.spifly.level = WARN
+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
# Security audit logger
log4j2.logger.audit.name = org.apache.karaf.jaas.modules.audit
@@ -65,74 +62,150 @@ log4j2.appender.console.name = Console
log4j2.appender.console.layout.type = PatternLayout
log4j2.appender.console.layout.pattern = ${log4j2.pattern}
-# Rolling file appender
-log4j2.appender.rolling.type = RollingRandomAccessFile
-log4j2.appender.rolling.name = RollingFile
-log4j.appender.rolling.level = INFO
-log4j2.appender.rolling.fileName = ${logDirectory}/${karafLogName}.log
-log4j2.appender.rolling.filePattern = ${logDirectory}/${karafLogName}.log.%i
-# uncomment to not force a disk flush
-#log4j2.appender.rolling.immediateFlush = false
-log4j2.appender.rolling.append = true
-log4j2.appender.rolling.layout.type = PatternLayout
-log4j2.appender.rolling.layout.pattern = ${log4j2.pattern}
-log4j2.appender.rolling.policies.type = Policies
-log4j2.appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
-log4j2.appender.rolling.policies.size.size = ${maxFileSize}
-
-# Audit file appender - not currently used, so commented out
-log4j2.appender.audit.type = RollingRandomAccessFile
-log4j2.appender.audit.name = AuditRollingFile
-log4j2.appender.audit.fileName = ${logDirectory}/${auditLogName}.log
-log4j2.appender.audit.filePattern = ${logDirectory}/${auditLogName}.log.%i
-log4j2.appender.audit.append = true
-log4j2.appender.audit.layout.type = PatternLayout
-log4j2.appender.audit.layout.pattern = ${log4j2.pattern}
-log4j2.appender.audit.policies.type = Policies
-log4j2.appender.audit.policies.size.type = SizeBasedTriggeringPolicy
-log4j2.appender.audit.policies.size.size = ${maxFileSize}
-
# OSGi appender
log4j2.appender.osgi.type = PaxOsgi
log4j2.appender.osgi.name = PaxOsgi
log4j2.appender.osgi.filter = *
-
-#ECOMP Debug appender
+# KarafFile appender
+log4j2.appender.karaf.type = RollingRandomAccessFile
+log4j2.appender.karaf.name = KarafFile
+log4j2.appender.karaf.fileName = ${logDirectory}/log/karaf.log
+log4j2.appender.karaf.filePattern = ${logDirectory}/log/karaf.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
+# Routing appender (log4j sift)
+log4j2.appender.routing.type = Routing
+log4j2.appender.routing.name = Routing
+log4j2.appender.routing.routes.type = Routes
+log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\}
+log4j2.appender.routing.routes.bundle.type = Route
+log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile
+log4j2.appender.routing.routes.bundle.appender.name = Bundle-\$\\\{ctx:bundle.name\}
+log4j2.appender.routing.routes.bundle.appender.fileName = ${logDirectory}/log/bundle-\$\\\{ctx:bundle.name\}.log
+log4j2.appender.routing.routes.bundle.appender.filePattern= ${logDirectory}/log/bundle-\$\\\{ctx:bundle.name\}.log.%i
+log4j2.appender.routing.routes.bundle.appender.append = true
+log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout
+log4j2.appender.routing.routes.bundle.appender.layout.pattern = ${log4j2.pattern}
+log4j2.appender.routing.routes.bundle.appender.policies.type = Policies
+log4j2.appender.routing.routes.bundle.appender.policies.size.type = SizeBasedTriggeringPolicy
+log4j2.appender.routing.routes.bundle.appender.policies.size.size = ${maxFileSize}
+
+#ecomp logging standards
log4j2.appender.debug.type = RollingRandomAccessFile
-log4j2.appender.debug.name = DebugRollingFile
-log4j2.appender.debug.fileName = ${logDirectory}/${debugLogName}.log
-log4j2.appender.debug.filePattern = ${logDirectory}/${debugLogName}.log.%i
+log4j2.appender.debug.name = DebugFile
+log4j2.appender.debug.fileName = <%= @logDir %>/debug.log
+log4j2.appender.debug.filePattern = <%= @logDir %>/debug.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 = ${log4j2.pattern}
+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
-#Error appender
log4j2.appender.error.type = RollingRandomAccessFile
-log4j2.appender.error.name = ErrorRollingFile
-log4j2.appender.error.fileName = ${logDirectory}/${errorLogName}.log
-log4j2.appender.error.filePattern = ${logDirectory}/${errorLogName}.log.%i
+log4j2.appender.error.name = ErrorFile
+log4j2.appender.error.fileName = <%= @logDir %>/error.log
+log4j2.appender.error.filePattern = <%= @logDir %>/error.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 = ${log4j2.pattern}
+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 = <%= @logDir %>/metric.log
+log4j2.appender.metric.filePattern = <%= @logDir %>/metric.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}|<%= @hostIP %>|%X{ElapsedTime}|<%= @hostFQDN %>|%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
-#Metrics appender - not used so commented out
-#log4j2.appender.metrics.type = RollingRandomAccessFile
-#log4j2.appender.metrics.name = MetricsRollingFile
-#log4j2.appender.metrics.fileName = ${logDirectory}/${metricsLogName}.log
-#log4j2.appender.metrics.filePattern = ${logDirectory}/${metricsLogName}.log.%i
-#log4j2.appender.metrics.append = true
-#log4j2.appender.metrics.layout.type = PatternLayout
-#log4j2.appender.metrics.layout.pattern = ${log4j2.pattern}
-#log4j2.appender.metrics.policies.type = Policies
-#log4j2.appender.metrics.policies.size.type = SizeBasedTriggeringPolicy
-#log4j2.appender.metrics.policies.size.size = ${maxFileSize}
+log4j2.appender.audit.type = RollingRandomAccessFile
+log4j2.appender.audit.name = AuditFile
+log4j2.appender.audit.fileName = <%= @logDir %>/audit.log
+log4j2.appender.audit.filePattern = <%= @logDir %>/audit.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}|<%= @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
+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
+
+# Loggers
+
+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.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.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.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 \ No newline at end of file