blob: 31bfe10cf5adce7fdd5945736758aad5ba6e9cec [file] [log] [blame]
Gary Wu9abb61c2018-09-27 10:38:50 -07001<!--
2
3 ============LICENSE_START=======================================================
4 org.onap.aai
5 ================================================================================
6 Copyright © 2017 AT&T Intellectual Property. All rights reserved.
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 ECOMP is a trademark and service mark of AT&T Intellectual Property.
22
23-->
24<configuration scan="true" scanPeriod="60 seconds" debug="false">
25 <statusListener class="ch.qos.logback.core.status.NopStatusListener" />
26
27 <property resource="application.properties" />
28
29 <property name="namespace" value="aai-traversal"/>
30
31 <property name="AJSC_HOME" value="${AJSC_HOME:-.}" />
32 <jmxConfigurator />
33 <property name="logDirectory" value="${AJSC_HOME}/logs" />
34 <property name="eelfLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/>
35 <property name="eelfAuditLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n|\r\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/>
36 <property name="eelfMetricLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{targetVirtualEntity}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/>
37 <!-- <property name="eelfErrorLogPattern" value="%ecompStartTime|%X{requestId}|%-10t|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%ecompErrorCategory|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n|\r\n', '^'}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> -->
38 <property name="eelfErrorLogPattern" value="%ecompStartTime|%X{requestId}|%-10t|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%ecompErrorCategory|%ecompResponseCode|%ecompResponseDescription|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/>
39 <property name="eelfTransLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{partnerName}:%m%n"/>
40
41 <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />
42 <conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
43 <conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" />
44 <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
45 <encoder>
46 <pattern>
47 %clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}
48 </pattern>
49 </encoder>
50 </appender>
51
52 <appender name="SANE" class="ch.qos.logback.core.rolling.RollingFileAppender">
53 <file>${logDirectory}/rest/sane.log</file>
54 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
55 <fileNamePattern>${logDirectory}/rest/sane.log.%d{yyyy-MM-dd}</fileNamePattern>
56 </rollingPolicy>
57 <encoder>
58 <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n
59 </pattern>
60 </encoder>
61 </appender>
62
63 <appender name="asyncSANE" class="ch.qos.logback.classic.AsyncAppender">
64 <queueSize>1000</queueSize>
65 <includeCallerData>true</includeCallerData>
66 <appender-ref ref="SANE" />
67 </appender>
68
69 <appender name="METRIC"
70 class="ch.qos.logback.core.rolling.RollingFileAppender">
71 <filter class="ch.qos.logback.classic.filter.LevelFilter">
72 <level>INFO</level>
73 <onMatch>ACCEPT</onMatch>
74 <onMismatch>DENY</onMismatch>
75 </filter>
76 <file>${logDirectory}/rest/metrics.log</file>
77 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
78 <fileNamePattern>${logDirectory}/rest/metrics.log.%d{yyyy-MM-dd}
79 </fileNamePattern>
80 </rollingPolicy>
81 <encoder class="org.onap.aai.logging.EcompEncoder">
82 <pattern>${eelfMetricLogPattern}</pattern>
83 </encoder>
84 </appender>
85 <appender name="asyncMETRIC" class="ch.qos.logback.classic.AsyncAppender">
86 <queueSize>1000</queueSize>
87 <includeCallerData>true</includeCallerData>
88 <appender-ref ref="METRIC" />
89 </appender>
90
91 <appender name="DEBUG"
92 class="ch.qos.logback.core.rolling.RollingFileAppender">
93 <filter class="ch.qos.logback.classic.filter.LevelFilter">
94 <level>DEBUG</level>
95 <onMatch>ACCEPT</onMatch>
96 <onMismatch>DENY</onMismatch>
97 </filter>
98 <file>${logDirectory}/rest/debug.log</file>
99 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
100 <fileNamePattern>${logDirectory}/rest/debug.log.%d{yyyy-MM-dd}
101 </fileNamePattern>
102 </rollingPolicy>
103 <encoder class="org.onap.aai.logging.EcompEncoder">
104 <pattern>${eelfLogPattern}</pattern>
105 </encoder>
106 </appender>
107
108 <appender name="asyncDEBUG" class="ch.qos.logback.classic.AsyncAppender">
109 <queueSize>1000</queueSize>
110 <includeCallerData>true</includeCallerData>
111 <appender-ref ref="DEBUG" />
112 </appender>
113
114 <appender name="ERROR"
115 class="ch.qos.logback.core.rolling.RollingFileAppender">
116 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
117 <level>WARN</level>
118 </filter>
119 <file>${logDirectory}/rest/error.log</file>
120 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
121 <fileNamePattern>${logDirectory}/rest/error.log.%d{yyyy-MM-dd}
122 </fileNamePattern>
123 </rollingPolicy>
124 <encoder class="org.onap.aai.logging.EcompEncoder">
125 <pattern>${eelfErrorLogPattern}</pattern>
126 </encoder>
127 </appender>
128
129 <appender name="asyncERROR" class="ch.qos.logback.classic.AsyncAppender">
130 <queueSize>1000</queueSize>
131 <includeCallerData>true</includeCallerData>
132 <appender-ref ref="ERROR" />
133 </appender>
134
135 <appender name="AUDIT"
136 class="ch.qos.logback.core.rolling.RollingFileAppender">
137 <file>${logDirectory}/rest/audit.log</file>
138 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
139 <fileNamePattern>${logDirectory}/rest/audit.log.%d{yyyy-MM-dd}
140 </fileNamePattern>
141 </rollingPolicy>
142 <encoder class="org.onap.aai.logging.EcompEncoder">
143 <pattern>${eelfAuditLogPattern}</pattern>
144 </encoder>
145 </appender>
146
147 <appender name="asyncAUDIT" class="ch.qos.logback.classic.AsyncAppender">
148 <queueSize>1000</queueSize>
149 <includeCallerData>true</includeCallerData>
150 <appender-ref ref="AUDIT" />
151 </appender>
152
153 <appender name="translog"
154 class="ch.qos.logback.core.rolling.RollingFileAppender">
155 <filter class="ch.qos.logback.classic.filter.LevelFilter">
156 <level>DEBUG</level>
157 <onMatch>ACCEPT</onMatch>
158 <onMismatch>DENY</onMismatch>
159 </filter>
160 <file>${logDirectory}/rest/translog.log</file>
161 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
162 <fileNamePattern>${logDirectory}/rest/translog.log.%d{yyyy-MM-dd}
163 </fileNamePattern>
164 </rollingPolicy>
165 <encoder class="org.onap.aai.logging.EcompEncoder">
166 <pattern>${eelfTransLogPattern}</pattern>
167 </encoder>
168 </appender>
169
170 <appender name="asynctranslog" class="ch.qos.logback.classic.AsyncAppender">
171 <queueSize>1000</queueSize>
172 <includeCallerData>true</includeCallerData>
173 <appender-ref ref="translog" />
174 </appender>
175
176 <appender name="dmaapAAIEventConsumer"
177 class="ch.qos.logback.core.rolling.RollingFileAppender">
178 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
179 <level>WARN</level>
180 </filter>
181 <File>${logDirectory}/dmaapAAIEventConsumer/error.log</File>
182 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
183 <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/error.log.%d{yyyy-MM-dd}
184 </fileNamePattern>
185 </rollingPolicy>
186 <encoder class="org.onap.aai.logging.EcompEncoder">
187 <pattern>${eelfLogPattern}</pattern>
188 </encoder>
189 </appender>
190
191 <appender name="dmaapAAIEventConsumerDebug"
192 class="ch.qos.logback.core.rolling.RollingFileAppender">
193 <filter class="ch.qos.logback.classic.filter.LevelFilter">
194 <level>DEBUG</level>
195 <onMatch>ACCEPT</onMatch>
196 <onMismatch>DENY</onMismatch>
197 </filter>
198 <File>${logDirectory}/dmaapAAIEventConsumer/debug.log</File>
199 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
200 <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/debug.log.%d{yyyy-MM-dd}
201 </fileNamePattern>
202 </rollingPolicy>
203 <encoder class="org.onap.aai.logging.EcompEncoder">
204 <pattern>${eelfLogPattern}</pattern>
205 </encoder>
206 </appender>
207 <appender name="dmaapAAIEventConsumerMetric"
208 class="ch.qos.logback.core.rolling.RollingFileAppender">
209 <filter class="ch.qos.logback.classic.filter.LevelFilter">
210 <level>INFO</level>
211 <onMatch>ACCEPT</onMatch>
212 <onMismatch>DENY</onMismatch>
213 </filter>
214 <File>${logDirectory}/dmaapAAIEventConsumer/metrics.log</File>
215 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
216 <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/metrics.log.%d{yyyy-MM-dd}
217 </fileNamePattern>
218 </rollingPolicy>
219 <encoder class="org.onap.aai.logging.EcompEncoder">
220 <pattern>${eelfMetricLogPattern}</pattern>
221 </encoder>
222 </appender>
223 <appender name="external"
224 class="ch.qos.logback.core.rolling.RollingFileAppender">
225 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
226 <level>WARN</level>
227 </filter>
228 <file>${logDirectory}/external/external.log</file>
229 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
230 <fileNamePattern>${logDirectory}/external/external.log.%d{yyyy-MM-dd}
231 </fileNamePattern>
232 </rollingPolicy>
233 <encoder class="org.onap.aai.logging.EcompEncoder">
234 <pattern>${eelfLogPattern}</pattern>
235 </encoder>
236 </appender>
237 <logger name="org.onap.aai" level="DEBUG" additivity="false">
238 <appender-ref ref="asyncDEBUG" />
239 <appender-ref ref="asyncERROR" />
240 <appender-ref ref="asyncMETRIC" />
241 <appender-ref ref="asyncSANE" />
242 </logger>
243
244 <!-- Spring related loggers -->
245 <logger name="org.springframework" level="WARN" />
246 <logger name="org.springframework.beans" level="WARN" />
247 <logger name="org.springframework.web" level="WARN" />
248 <logger name="com.blog.spring.jms" level="WARN" />
249 <logger name="com.jayway.jsonpath" level="WARN" />
250
251 <!-- AJSC Services (bootstrap services) -->
252 <logger name="ajsc" level="WARN" />
253 <logger name="ajsc.RouteMgmtService" level="WARN" />
254 <logger name="ajsc.ComputeService" level="WARN" />
255 <logger name="ajsc.VandelayService" level="WARN" />
256 <logger name="ajsc.FilePersistenceService" level="WARN" />
257 <logger name="ajsc.UserDefinedJarService" level="WARN" />
258 <logger name="ajsc.UserDefinedBeansDefService" level="WARN" />
259 <logger name="ajsc.LoggingConfigurationService" level="WARN" />
260
261 <!-- AJSC related loggers (DME2 Registration, csi logging, restlet, servlet
262 logging) -->
263 <logger name="org.codehaus.groovy" level="WARN" />
264 <logger name="com.att.scamper" level="WARN" />
265 <logger name="ajsc.utils" level="WARN" />
266 <logger name="ajsc.utils.DME2Helper" level="WARN" />
267 <logger name="ajsc.filters" level="WARN" />
268 <logger name="ajsc.beans.interceptors" level="WARN" />
269 <logger name="ajsc.restlet" level="WARN" />
270 <logger name="ajsc.servlet" level="WARN" />
271 <logger name="com.att.ajsc" level="WARN" />
272 <logger name="com.att.ajsc.csi.logging" level="WARN" />
273 <logger name="com.att.ajsc.filemonitor" level="WARN" />
274 <logger name="com.netflix.loadbalancer" level="WARN" />
275
276 <logger name="org.apache.zookeeper" level="OFF" />
277
278 <!-- Other Loggers that may help troubleshoot -->
279 <logger name="net.sf" level="WARN" />
280 <logger name="org.apache.commons.httpclient" level="WARN" />
281 <logger name="org.apache.commons" level="WARN" />
282 <logger name="org.apache.coyote" level="WARN" />
283 <logger name="org.apache.jasper" level="WARN" />
284
285 <!-- Camel Related Loggers (including restlet/servlet/jaxrs/cxf logging.
286 May aid in troubleshooting) -->
287 <logger name="org.apache.camel" level="WARN" />
288 <logger name="org.apache.cxf" level="WARN" />
289 <logger name="org.apache.camel.processor.interceptor" level="WARN" />
290 <logger name="org.apache.cxf.jaxrs.interceptor" level="WARN" />
291 <logger name="org.apache.cxf.service" level="WARN" />
292 <logger name="org.restlet" level="WARN" />
293 <logger name="org.apache.camel.component.restlet" level="WARN" />
294
295 <logger name="org.hibernate.validator" level="WARN" />
296 <logger name="org.hibernate" level="WARN" />
297 <logger name="org.hibernate.ejb" level="OFF" />
298
299 <!-- logback internals logging -->
300 <logger name="ch.qos.logback.classic" level="WARN" />
301 <logger name="ch.qos.logback.core" level="WARN" />
302
303 <logger name="org.eclipse.jetty" level="WARN" />
304
305 <!-- logback jms appenders & loggers definition starts here -->
306 <appender name="auditLogs"
307 class="ch.qos.logback.core.rolling.RollingFileAppender">
308 <filter class="ch.qos.logback.classic.filter.ThresholdFilter" />
309 <file>${logDirectory}/perf-audit/Audit-${lrmRVer}-${lrmRO}-${Pid}.log
310 </file>
311 <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
312 <fileNamePattern>${logDirectory}/perf-audit/Audit-${lrmRVer}-${lrmRO}-${Pid}.%i.log.zip
313 </fileNamePattern>
314 <minIndex>1</minIndex>
315 <maxIndex>9</maxIndex>
316 </rollingPolicy>
317 <triggeringPolicy
318 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
319 <maxFileSize>5MB</maxFileSize>
320 </triggeringPolicy>
321 <encoder>
322 <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern>
323 </encoder>
324 </appender>
325 <appender name="perfLogs"
326 class="ch.qos.logback.core.rolling.RollingFileAppender">
327 <filter class="ch.qos.logback.classic.filter.ThresholdFilter" />
328 <file>${logDirectory}/perf-audit/Perform-${lrmRVer}-${lrmRO}-${Pid}.log
329 </file>
330 <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
331 <fileNamePattern>${logDirectory}/perf-audit/Perform-${lrmRVer}-${lrmRO}-${Pid}.%i.log.zip
332 </fileNamePattern>
333 <minIndex>1</minIndex>
334 <maxIndex>9</maxIndex>
335 </rollingPolicy>
336 <triggeringPolicy
337 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
338 <maxFileSize>5MB</maxFileSize>
339 </triggeringPolicy>
340 <encoder>
341 <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern>
342 </encoder>
343 </appender>
344 <logger name="AuditRecord" level="INFO" additivity="false">
345 <appender-ref ref="auditLogs" />
346 </logger>
347 <logger name="AuditRecord_DirectCall" level="INFO" additivity="false">
348 <appender-ref ref="auditLogs" />
349 </logger>
350 <logger name="PerfTrackerRecord" level="INFO" additivity="false">
351 <appender-ref ref="perfLogs" />
352 </logger>
353 <!-- logback jms appenders & loggers definition ends here -->
354
355 <logger name="org.onap.aai.interceptors.post" level="DEBUG"
356 additivity="false">
357 <appender-ref ref="asynctranslog" />
358 </logger>
359
360 <logger name="org.onap.aai.interceptors.pre.SetLoggingContext" level="DEBUG">
361 <appender-ref ref="asyncAUDIT"/>
362 </logger>
363
364 <logger name="org.onap.aai.interceptors.post.ResetLoggingContext" level="DEBUG">
365 <appender-ref ref="asyncAUDIT"/>
366 </logger>
367
368 <logger name="org.onap.aai.dmaap" level="DEBUG" additivity="false">
369 <appender-ref ref="dmaapAAIEventConsumer" />
370 <appender-ref ref="dmaapAAIEventConsumerDebug" />
371 <appender-ref ref="dmaapAAIEventConsumerMetric" />
372 </logger>
373
374 <logger name="org.apache" level="OFF" />
375 <logger name="org.zookeeper" level="OFF" />
376 <logger name="com.thinkaurelius" level="WARN" />
377 <logger name="com.att.aft.dme2" level="WARN" />
378
379 <!-- ============================================================================ -->
380 <!-- General EELF logger -->
381 <!-- ============================================================================ -->
382 <logger name="com.att.eelf" level="WARN" additivity="false">
383 <appender-ref ref="asyncDEBUG" />
384 <appender-ref ref="asyncERROR" />
385 <appender-ref ref="asyncMETRIC" />
386 </logger>
387
388 <root level="DEBUG">
389 <appender-ref ref="external" />
390 </root>
391</configuration>