blob: c582620fa8a55ee47aabaadac4d44b4a6242d7af [file] [log] [blame]
Itay Hasside2da86d2017-08-24 12:54:42 +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
20# Root logger
21log4j.rootLogger=INFO, async, osgi:*
22log4j.throwableRenderer=org.apache.log4j.OsgiThrowableRenderer
23
24maxFileSize=100MB
25maxBackupIndex=20
26logDir=/var/log/onap
27componentName=appc
28logDirectory=${logDir}/${componentName}
29karafLogName=karaf
30errorLogName=error
31metricsLogName=metrics
32auditLogName=audit
33debugLogName=debug
34
35
36# CONSOLE appender not used by default
37log4j.appender.stdout=org.apache.log4j.ConsoleAppender
38log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
39log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd'T'HH:mm:ss.SSS}\t%-16.16t\t%-5.5p\t%c{36}\t%X{bundle.id} - %X{bundle.name} - %X{bundle.version}\t%m%n
40
41# Async appender forwarding to file appender
42log4j.appender.async=org.apache.log4j.AsyncAppender
43log4j.appender.async.appenders=out
44
45# File appender
46log4j.appender.out=org.apache.log4j.RollingFileAppender
47log4j.appender.out.layout=org.apache.log4j.xml.XMLLayout
48log4j.appender.out.layout.Properties=true
49log4j.appender.out.file=${logDirectory}/${karafLogName}.log
50log4j.appender.out.append=true
51log4j.appender.out.maxFileSize=${maxFileSize}
52log4j.appender.out.maxBackupIndex=${maxBackupIndex}
53
54# Sift appender
55log4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender
56log4j.appender.sift.key=bundle.name
57log4j.appender.sift.default=karaf
58log4j.appender.sift.appender=org.apache.log4j.RollingFileAppender
59log4j.appender.sift.appender.layout=org.apache.log4j.xml.XMLLayout
60log4j.appender.sift.appender.layout.Properties=true
61log4j.appender.sift.appender.file=${logDirectory}/$\\{bundle.name\\}.log
62log4j.appender.sift.appender.append=true
63
64
65
66log4j.category.org.opendaylight.controller.netconf.persist.impl.osgi.ConfigPusherImpl=DEBUG
67log4j.category.org.opendaylight.controller.netconf.persist.impl.osgi.ConfigPersisterActivator=DEBUG
68
69
70#ECOMP Debug appender
71log4j.appender.debug=org.apache.log4j.RollingFileAppender
72log4j.appender.debug.key=bundle.name
73log4j.appender.debug.default=karaf
74log4j.appender.debug.appName=EELFDebug
75log4j.appender.debug.layout=org.apache.log4j.xml.XMLLayout
76log4j.appender.debug.layout.Properties=true
77log4j.appender.debug.file=${logDirectory}/${debugLogName}.log
78log4j.appender.debug.append=true
79log4j.appender.debug.maxFileSize=${maxFileSize}
80log4j.appender.debug.maxBackupIndex=${maxBackupIndex}
81#log4j.appender.debug.filter.f1=org.apache.log4j.varia.LevelRangeFilter
82#log4j.appender.debug.filter.f1.LevelMax=WARN
83#log4j.appender.debug.filter.f1.LevelMin=TRACE
84
85
86#Error appender
87log4j.appender.error=org.apache.log4j.RollingFileAppender
88log4j.appender.error.appName=EELFError
89log4j.appender.error.File=${logDirectory}/${errorLogName}.log
90log4j.appender.error.Threshold=ERROR
91log4j.appender.error.maxFileSize=${maxFileSize}
92log4j.appender.error.maxBackupIndex=${maxBackupIndex}
93log4j.appender.error.layout=org.apache.log4j.xml.XMLLayout
94log4j.appender.error.layout.Properties=true
95
96#Metrics appender
97log4j.appender.metric=org.apache.log4j.RollingFileAppender
98log4j.appender.metric.appName=EELFMetrics
99log4j.appender.metric.File=${logDirectory}/${metricsLogName}.log
100log4j.appender.metric.maxFileSize=${maxFileSize}
101log4j.appender.metric.maxBackupIndex=${maxBackupIndex}
102log4j.appender.metric.layout=org.apache.log4j.xml.XMLLayout
103log4j.appender.metric.layout.Properties=true
104
105#Audit appender
106log4j.appender.audit=org.apache.log4j.RollingFileAppender
107log4j.appender.audit.appName=EELFAudit
108log4j.appender.audit.File=${logDirectory}/${auditLogName}.log
109log4j.appender.audit.maxFileSize=${maxFileSize}
110log4j.appender.audit.maxBackupIndex=${maxBackupIndex}
111log4j.appender.audit.layout=org.apache.log4j.xml.XMLLayout
112log4j.appender.audit.layout.Properties=true
113
114#Loggers
115#Routing of all messages from root logger
116log4j.logger.com.att=TRACE, debug, error
117#Store to the same log file messages from upper level appender or not
118log4j.additivity.com.att=false
119
120#EELFManager loggers
121#EELF parent logger
122log4j.logger.com.att.eelf=TRACE, debug
123log4j.additivity.com.att.eelf=false
124
125#Audit logger routing
126log4j.logger.com.att.eelf.audit=DEBUG, audit
127log4j.additivity.com.att.eelf.audit=false
128
129#Metric logger routing
130log4j.logger.com.att.eelf.metrics=DEBUG, metric
131log4j.additivity.com.att.eelf.metrics=false
132
133#Performance logger routing
134log4j.logger.com.att.eelf.perf=DEBUG, metric
135log4j.additivity.com.att.eelf.perf=false
136
137#Server logger routing
138log4j.logger.com.att.eelf.server=DEBUG, debug
139log4j.additivity.com.att.eelf.server=false
140
141#Policy logger routing
142log4j.logger.com.att.eelf.policy=DEBUG, debug
143log4j.additivity.com.att.eelf.policy=false
144
145#Error logger routing
146log4j.logger.com.att.eelf.error=DEBUG, error
147log4j.additivity.com.att.eelf.error=false
148
149#Debug logger routing
150log4j.logger.com.att.eelf.debug=DEBUG, debug
151log4j.additivity.com.att.eelf.debug=false