blob: 117a663dd45844d64fae5e3b1fd28bcc21719223 [file] [log] [blame]
jmac065e2ce2018-03-29 01:18:02 +00001################################################################################
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################################################################################
19
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050020# Common pattern layout for appenders
21log4j2.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %X{currentGraph} - %X{nodeId} | %m%n
jmac065e2ce2018-03-29 01:18:02 +000022
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050023
24# Common properties
jmac065e2ce2018-03-29 01:18:02 +000025maxFileSize=100MB
26maxBackupIndex=20
27logDir=/var/log/onap
28componentName=sdnc
29logDirectory=${logDir}/${componentName}
30karafLogName=karaf
31errorLogName=error
32metricsLogName=metrics
33auditLogName=audit
34debugLogName=debug
35
36
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050037# Root logger
38log4j2.rootLogger.level = INFO
39# uncomment to use asynchronous loggers, which require mvn:com.lmax/disruptor/3.3.2 library
40#log4j2.rootLogger.type = asyncRoot
41#log4j2.rootLogger.includeLocation = false
42log4j2.rootLogger.appenderRef.RollingFile.ref = RollingFile
43log4j2.rootLogger.appenderRef.PaxOsgi.ref = PaxOsgi
44log4j2.rootLogger.appenderRef.Console.ref = Console
45log4j2.rootLogger.appenderRef.Console.filter.threshold.type = ThresholdFilter
46log4j2.rootLogger.appenderRef.Console.filter.threshold.level = ${karaf.log.console:-OFF}
jmac065e2ce2018-03-29 01:18:02 +000047
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050048# Loggers configuration
jmac065e2ce2018-03-29 01:18:02 +000049
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050050# Spifly logger
51log4j2.logger.spifly.name = org.apache.aries.spifly
52log4j2.logger.spifly.level = WARN
jmac065e2ce2018-03-29 01:18:02 +000053
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050054# Security audit logger
55log4j2.logger.audit.name = org.apache.karaf.jaas.modules.audit
56log4j2.logger.audit.level = INFO
57log4j2.logger.audit.additivity = false
58log4j2.logger.audit.appenderRef.AuditRollingFile.ref = AuditRollingFile
jmac065e2ce2018-03-29 01:18:02 +000059
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050060# Appenders configuration
jmac065e2ce2018-03-29 01:18:02 +000061
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050062# Console appender not used by default (see log4j2.rootLogger.appenderRefs)
63log4j2.appender.console.type = Console
64log4j2.appender.console.name = Console
65log4j2.appender.console.layout.type = PatternLayout
66log4j2.appender.console.layout.pattern = ${log4j2.pattern}
jmac065e2ce2018-03-29 01:18:02 +000067
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -050068# Rolling file appender
69log4j2.appender.rolling.type = RollingRandomAccessFile
70log4j2.appender.rolling.name = RollingFile
71log4j.appender.rolling.level = INFO
72log4j2.appender.rolling.fileName = ${logDirectory}/${karafLogName}.log
73log4j2.appender.rolling.filePattern = ${logDirectory}/${karafLogName}.log.%i
74# uncomment to not force a disk flush
75#log4j2.appender.rolling.immediateFlush = false
76log4j2.appender.rolling.append = true
77log4j2.appender.rolling.layout.type = PatternLayout
78log4j2.appender.rolling.layout.pattern = ${log4j2.pattern}
79log4j2.appender.rolling.policies.type = Policies
80log4j2.appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
81log4j2.appender.rolling.policies.size.size = ${maxFileSize}
82
83# Audit file appender - not currently used, so commented out
84log4j2.appender.audit.type = RollingRandomAccessFile
85log4j2.appender.audit.name = AuditRollingFile
86log4j2.appender.audit.fileName = ${logDirectory}/${auditLogName}.log
87log4j2.appender.audit.filePattern = ${logDirectory}/${auditLogName}.log.%i
88log4j2.appender.audit.append = true
89log4j2.appender.audit.layout.type = PatternLayout
90log4j2.appender.audit.layout.pattern = ${log4j2.pattern}
91log4j2.appender.audit.policies.type = Policies
92log4j2.appender.audit.policies.size.type = SizeBasedTriggeringPolicy
93log4j2.appender.audit.policies.size.size = ${maxFileSize}
94
95# OSGi appender
96log4j2.appender.osgi.type = PaxOsgi
97log4j2.appender.osgi.name = PaxOsgi
98log4j2.appender.osgi.filter = *
jmac065e2ce2018-03-29 01:18:02 +000099
100
101#ECOMP Debug appender
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -0500102log4j2.appender.debug.type = RollingRandomAccessFile
103log4j2.appender.debug.name = DebugRollingFile
104log4j2.appender.debug.fileName = ${logDirectory}/${debugLogName}.log
105log4j2.appender.debug.filePattern = ${logDirectory}/${debugLogName}.log.%i
106log4j2.appender.debug.append = true
107log4j2.appender.debug.layout.type = PatternLayout
108log4j2.appender.debug.layout.pattern = ${log4j2.pattern}
109log4j2.appender.debug.policies.type = Policies
110log4j2.appender.debug.policies.size.type = SizeBasedTriggeringPolicy
111log4j2.appender.debug.policies.size.size = ${maxFileSize}
jmac065e2ce2018-03-29 01:18:02 +0000112
113
114#Error appender
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -0500115log4j2.appender.error.type = RollingRandomAccessFile
116log4j2.appender.error.name = ErrorRollingFile
117log4j2.appender.error.fileName = ${logDirectory}/${errorLogName}.log
118log4j2.appender.error.filePattern = ${logDirectory}/${errorLogName}.log.%i
119log4j2.appender.error.append = true
120log4j2.appender.error.layout.type = PatternLayout
121log4j2.appender.error.layout.pattern = ${log4j2.pattern}
122log4j2.appender.error.policies.type = Policies
123log4j2.appender.error.policies.size.type = SizeBasedTriggeringPolicy
124log4j2.appender.error.policies.size.size = ${maxFileSize}
jmac065e2ce2018-03-29 01:18:02 +0000125
Timoney, Dan (dt5972)a0522182018-11-07 11:22:19 -0500126#Metrics appender - not used so commented out
127#log4j2.appender.metrics.type = RollingRandomAccessFile
128#log4j2.appender.metrics.name = MetricsRollingFile
129#log4j2.appender.metrics.fileName = ${logDirectory}/${metricsLogName}.log
130#log4j2.appender.metrics.filePattern = ${logDirectory}/${metricsLogName}.log.%i
131#log4j2.appender.metrics.append = true
132#log4j2.appender.metrics.layout.type = PatternLayout
133#log4j2.appender.metrics.layout.pattern = ${log4j2.pattern}
134#log4j2.appender.metrics.policies.type = Policies
135#log4j2.appender.metrics.policies.size.type = SizeBasedTriggeringPolicy
136#log4j2.appender.metrics.policies.size.size = ${maxFileSize}
jmac065e2ce2018-03-29 01:18:02 +0000137
jmac065e2ce2018-03-29 01:18:02 +0000138