blob: e40ba13d04f4b3a264f48f9f1d51c395dc39d7b6 [file] [log] [blame]
Michael Arrastiaf0b74b12018-08-21 13:36:27 +01001<!--
2 ============LICENSE_START=======================================================
3 org.onap.aai
4 ================================================================================
5 Copyright © 2018 AT&T Intellectual Property. All rights reserved.
6 Copyright © 2018 Amdocs
7 ================================================================================
8 Licensed under the Apache License, Version 2.0 (the "License");
9 you may not use this file except in compliance with the License.
10 You may obtain a copy of the License at
11
12 http://www.apache.org/licenses/LICENSE-2.0
13
14 Unless required by applicable law or agreed to in writing, software
15 distributed under the License is distributed on an "AS IS" BASIS,
16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 See the License for the specific language governing permissions and
18 limitations under the License.
19 ============LICENSE_END=========================================================
20-->
21<configuration scan="true" scanPeriod="3 seconds" debug="false">
22 <!--<jmxConfigurator /> -->
23 <!-- directory path for all other type logs -->
24
25 <property name="logDir" value="/var/log/onap" />
26
27 <!-- specify the component name
28 <ECOMP-component-name>::= "MSO" | "DCAE" | "ASDC " | "AAI" |"Policy" | "SDNC" | "AC" -->
29 <property name="componentName" value="AAI-SPK" />
30
31 <!-- default eelf log file names -->
32 <property name="generalLogName" value="error" />
33 <property name="metricsLogName" value="metrics" />
34 <property name="auditLogName" value="audit" />
35 <property name="debugLogName" value="debug" />
36
37 <property name="errorLogPattern" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%mdc{RequestId}|%thread|Spike|%mdc{PartnerName}|%logger||%.-5level|%msg%n" />
38 <property name="auditMetricPattern" value="%m%n" />
39
40 <property name="logDirectory" value="${logDir}/${componentName}" />
41
42 <!-- Example evaluator filter applied against console appender -->
43 <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
44 <encoder>
45 <pattern>${errorLogPattern}</pattern>
46 </encoder>
47 </appender>
48
49 <!-- ============================================================================ -->
50 <!-- EELF Appenders -->
51 <!-- ============================================================================ -->
52
53 <!-- The EELFAppender is used to record events to the general application
54 log -->
55
56 <appender name="EELF"
57 class="ch.qos.logback.core.rolling.RollingFileAppender">
58 <file>${logDirectory}/${generalLogName}.log</file>
59 <rollingPolicy
60 class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
61 <fileNamePattern>${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.log.zip
62 </fileNamePattern>
63 <maxHistory>60</maxHistory>
64 </rollingPolicy>
65 <encoder>
66 <pattern>${errorLogPattern}</pattern>
67 </encoder>
68 </appender>
69 <appender name="asyncEELF" class="ch.qos.logback.classic.AsyncAppender">
70 <!-- deny all events with a level below INFO, that is TRACE and DEBUG -->
71 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
72 <level>INFO</level>
73 </filter>
74 <queueSize>256</queueSize>
75 <appender-ref ref="EELF" />
76 </appender>
77
78 <!-- EELF Audit Appender. This appender is used to record audit engine
79 related logging events. The audit logger and appender are specializations
80 of the EELF application root logger and appender. This can be used to segregate
81 Policy engine events from other components, or it can be eliminated to record
82 these events as part of the application root log. -->
83
84 <appender name="EELFAudit"
85 class="ch.qos.logback.core.rolling.RollingFileAppender">
86 <file>${logDirectory}/${auditLogName}.log</file>
87 <rollingPolicy
88 class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
89 <fileNamePattern>${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.log.zip
90 </fileNamePattern>
91 <maxHistory>60</maxHistory>
92 </rollingPolicy>
93 <encoder>
94 <pattern>${auditMetricPattern}</pattern>
95 </encoder>
96 </appender>
97 <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender">
98 <queueSize>256</queueSize>
99 <appender-ref ref="EELFAudit" />
100 </appender>
101
102 <appender name="EELFMetrics"
103 class="ch.qos.logback.core.rolling.RollingFileAppender">
104 <file>${logDirectory}/${metricsLogName}.log</file>
105 <rollingPolicy
106 class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
107 <fileNamePattern>${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.log.zip
108 </fileNamePattern>
109 <maxHistory>60</maxHistory>
110 </rollingPolicy>
111 <encoder>
112 <!-- <pattern>"%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} -
113 %msg%n"</pattern> -->
114 <pattern>${auditMetricPattern}</pattern>
115 </encoder>
116 </appender>
117
118 <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender">
119 <queueSize>256</queueSize>
120 <appender-ref ref="EELFMetrics"/>
121 </appender>
122
123 <appender name="EELFDebug"
124 class="ch.qos.logback.core.rolling.RollingFileAppender">
125 <file>${logDirectory}/${debugLogName}.log</file>
126 <rollingPolicy
127 class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
128 <fileNamePattern>${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.log.zip
129 </fileNamePattern>
130 <maxHistory>60</maxHistory>
131 </rollingPolicy>
132 <encoder>
133 <pattern>${errorLogPattern}</pattern>
134 </encoder>
135 </appender>
136
137 <appender name="asyncEELFDebug" class="ch.qos.logback.classic.AsyncAppender">
138 <queueSize>256</queueSize>
139 <appender-ref ref="EELFDebug" />
140 <includeCallerData>false</includeCallerData>
141 </appender>
142
143 <!-- ============================================================================ -->
144 <!-- EELF loggers -->
145 <!-- ============================================================================ -->
146 <logger name="com.att.eelf" level="info" additivity="false">
147 <appender-ref ref="asyncEELF" />
148 <appender-ref ref="asyncEELFDebug" />
149 </logger>
150
151 <logger name="com.att.eelf.audit" level="info" additivity="false">
152 <appender-ref ref="asyncEELFAudit" />
153 </logger>
154 <logger name="com.att.eelf.metrics" level="info" additivity="false">
155 <appender-ref ref="asyncEELFMetrics" />
156 </logger>
157
158 <!-- Spring related loggers -->
159 <logger name="org.springframework" level="WARN" />
160 <logger name="org.springframework.beans" level="WARN" />
161 <logger name="org.springframework.web" level="WARN" />
162 <logger name="com.blog.spring.jms" level="WARN" />
163
164 <!-- Spike service loggers -->
165 <logger name="org.onap.aai.spike" level="INFO" />
166
167 <!-- Other Loggers that may help troubleshoot -->
168 <logger name="net.sf" level="WARN" />
169 <logger name="org.apache" level="WARN" />
170 <logger name="org.apache.commons.httpclient" level="WARN" />
171 <logger name="org.apache.commons" level="WARN" />
172 <logger name="org.apache.coyote" level="WARN" />
173 <logger name="org.apache.jasper" level="WARN" />
174
175 <!-- Camel Related Loggers (including restlet/servlet/jaxrs/cxf logging.
176 May aid in troubleshooting) -->
177 <logger name="org.apache.camel" level="WARN" />
178 <logger name="org.apache.cxf" level="WARN" />
179 <logger name="org.apache.camel.processor.interceptor" level="WARN" />
180 <logger name="org.apache.cxf.jaxrs.interceptor" level="WARN" />
181 <logger name="org.apache.cxf.service" level="WARN" />
182 <logger name="org.restlet" level="WARN" />
183 <logger name="org.apache.camel.component.restlet" level="WARN" />
184
185 <!-- logback internals logging -->
186 <logger name="ch.qos.logback.classic" level="WARN" />
187 <logger name="ch.qos.logback.core" level="WARN" />
188
189 <root>
190 <appender-ref ref="asyncEELF" />
191 <!-- <appender-ref ref="asyncEELFDebug" /> -->
192 </root>
193
194</configuration>