blob: f24e86d8d00977eff283b1632bfbc4eb316f0d8e [file] [log] [blame]
Sylvain Desbureaux70070412020-11-09 21:58:48 +01001<!--
2
3 ============LICENSE_START=======================================================
4 org.onap.aai
5 ================================================================================
6 Copyright © 2017 AT&T Intellectual Property. All rights reserved.
7 Modifications Copyright © 2018 Amdocs, Bell Canada
8 ================================================================================
9 Licensed under the Apache License, Version 2.0 (the "License");
10 you may not use this file except in compliance with the License.
11 You may obtain a copy of the License at
12
13 http://www.apache.org/licenses/LICENSE-2.0
14
15 Unless required by applicable law or agreed to in writing, software
16 distributed under the License is distributed on an "AS IS" BASIS,
17 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 See the License for the specific language governing permissions and
19 limitations under the License.
20 ============LICENSE_END=========================================================
21
22 ECOMP is a trademark and service mark of AT&T Intellectual Property.
23
24-->
25<configuration scan="true" scanPeriod="60 seconds" debug="false">
26 <statusListener class="ch.qos.logback.core.status.NopStatusListener" />
27
28 <property resource="application.properties" />
29
30 <property name="namespace" value="aai-resources"/>
31
32 <property name="AJSC_HOME" value="${AJSC_HOME:-.}" />
33 <jmxConfigurator />
34 <property name="logDirectory" value="${AJSC_HOME}/logs" />
35 <!-- Old patterns
36 <property name="eelfLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%ecompServiceName|%X{partnerName}|%ecompStatusCode|%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"/>
37 <property name="eelfAuditLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%ecompServiceName|%X{partnerName}|%ecompStatusCode|%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"/>
38 <property name="eelfMetricLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%ecompServiceName|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%ecompStatusCode|%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"/>
39 <property name="eelfErrorLogPattern" value="%ecompStartTime|%X{requestId}|%-10t|%ecompServiceName|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%ecompErrorCategory|%ecompResponseCode|%ecompResponseDescription|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/>
40 <property name="eelfTransLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%ecompServiceName|%X{partnerName}|%ecompStatusCode|%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"/>
41 -->
42 <property name="p_tim" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, UTC}"/>
43 <property name="p_lvl" value="%level"/>
44 <property name="p_log" value="%logger"/>
45 <property name="p_mdc" value="%replace(%replace(%replace(%mdc){'\t','\\\\t'}){'\n', '\\\\n'}){'\\|', '!'}"/>
46 <property name="p_msg" value="%replace(%replace(%msg){'\t', '\\\\t'}){'\n','\\\\n'}"/>
47 <property name="p_exc" value="%replace(%replace(%rootException){'\t', '\\\\t'}){'\n','\\\\n'}"/>
48 <property name="p_mak" value="%replace(%replace(%marker){'\t', '\\\\t'}){'\n','\\\\n'}"/>
49 <property name="p_thr" value="%thread"/>
50 <property name="pattern" value="%nopexception${p_tim}\t${p_thr}\t${p_lvl}\t${p_log}\t${p_mdc}\t${p_msg}\t${p_exc}\t${p_mak}\t%n"/>
51 <!-- Patterns from onap demo -->
52 <property name="errorPattern" value="%X{LogTimestamp}|%X{RequestID}|%thread|%replace(%X{ServiceName}){'\\|', '!'}|%X{PartnerName}|%X{TargetEntity}|%replace(%X{TargetServiceName}){'\\|', '!'}|%.-5level|%X{ErrorCode}|%X{ErrorDesc}|%msg%n" />
53 <property name="debugPattern" value="%X{LogTimestamp}|%X{RequestID}|%msg\t${p_mdc}\t${p_msg}\t${p_exc}\t${p_mak}\t|^%n" />
54 <property name="auditPattern" value="%X{EntryTimestamp}|%X{LogTimestamp}|%X{RequestID}|%X{ServiceInstanceID}|%thread||%replace(%X{ServiceName}){'\\|', '!'}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}||||${p_mak}|${p_mdc}|||%msg%n" />
55 <property name="metricPattern" value="%X{InvokeTimestamp}|%X{LogTimestamp}|%X{RequestID}|%X{ServiceInstanceID}|%thread||%replace(%X{ServiceName}){'\\|', '!'}|%X{PartnerName}|%X{TargetEntity}|%replace(%X{TargetServiceName}){'\\|', '!'}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}||||%X{TargetVirtualEntity}|${p_mak}|${p_mdc}|||%msg%n" />
56 <property name="transLogPattern" value="%X{LogTimestamp}|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{RequestID}|%X{ServiceInstanceID}|%-10t|%X{ServerFQDN}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%replace(%replace(%X{ResponseDesc}){'\\|', '!'}){'\r|\n', '^'}|%X{InstanceUUID}|%level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{clientIpAddress}||%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{PartnerName}:%m%n"/>
57 <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />
58 <conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
59 <conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" />
60 <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
61 <encoder>
62 <pattern>
63 %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}
64 </pattern>
65 </encoder>
66 </appender>
67
68 <appender name="SANE" class="ch.qos.logback.core.rolling.RollingFileAppender">
69 <file>${logDirectory}/rest/sane.log</file>
70 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
71 <fileNamePattern>${logDirectory}/rest/sane.log.%d{yyyy-MM-dd}</fileNamePattern>
72 </rollingPolicy>
73 <encoder>
74 <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n
75 </pattern>
76 </encoder>
77 </appender>
78
79 <appender name="asyncSANE" class="ch.qos.logback.classic.AsyncAppender">
80 <queueSize>1000</queueSize>
81 <includeCallerData>true</includeCallerData>
82 <appender-ref ref="SANE" />
83 </appender>
84 <appender name="METRIC" class="ch.qos.logback.core.rolling.RollingFileAppender">
85 <file>${logDirectory}/rest/metrics.log</file>
86 <rollingPolicy
87 class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
88 <fileNamePattern>${logDirectory}/rest/metrics.log.%d{yyyy-MM-dd}</fileNamePattern>
89 </rollingPolicy>
90 <encoder>
91 <pattern>${metricPattern}</pattern>
92 </encoder>
93 </appender>
94
95 <appender name="asyncMETRIC" class="ch.qos.logback.classic.AsyncAppender">
96 <queueSize>1000</queueSize>
97 <includeCallerData>true</includeCallerData>
98 <appender-ref ref="METRIC"/>
99 </appender>
100
101 <appender name="DEBUG"
102 class="ch.qos.logback.core.rolling.RollingFileAppender">
103 <filter class="ch.qos.logback.classic.filter.LevelFilter">
104 <level>DEBUG</level>
105 <onMatch>ACCEPT</onMatch>
106 <onMismatch>DENY</onMismatch>
107 </filter>
108 <file>${logDirectory}/rest/debug.log</file>
109 <rollingPolicy
110 class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
111 <fileNamePattern>${logDirectory}/rest/debug.log.%d{yyyy-MM-dd}</fileNamePattern>
112 </rollingPolicy>
113 <encoder>
114 <pattern>${debugPattern}</pattern>
115 </encoder>
116 </appender>
117
118 <appender name="asyncDEBUG" class="ch.qos.logback.classic.AsyncAppender">
119 <queueSize>1000</queueSize>
120 <appender-ref ref="DEBUG" />
121 <includeCallerData>true</includeCallerData>
122 </appender>
123 <appender name="ERROR"
124 class="ch.qos.logback.core.rolling.RollingFileAppender">
125 <file>${logDirectory}/rest/error.log</file>
126 <rollingPolicy
127 class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
128 <fileNamePattern>${logDirectory}/rest/error.log.%d{yyyy-MM-dd}</fileNamePattern>
129 </rollingPolicy>
130 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
131 <level>WARN</level>
132 </filter>
133 <encoder>
134 <pattern>${errorPattern}</pattern>
135 </encoder>
136 </appender>
137
138 <appender name="asyncERROR" class="ch.qos.logback.classic.AsyncAppender">
139 <queueSize>1000</queueSize>
140 <appender-ref ref="ERROR"/>
141 </appender>
142
143 <appender name="AUDIT"
144 class="ch.qos.logback.core.rolling.RollingFileAppender">
145 <file>${logDirectory}/rest/audit.log</file>
146 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
147 <fileNamePattern>${logDirectory}/rest/audit.log.%d{yyyy-MM-dd}
148 </fileNamePattern>
149 </rollingPolicy>
150 <encoder>
151 <pattern>${auditPattern}</pattern>
152 </encoder>
153 </appender>
154
155 <appender name="asyncAUDIT" class="ch.qos.logback.classic.AsyncAppender">
156 <queueSize>1000</queueSize>
157 <includeCallerData>true</includeCallerData>
158 <appender-ref ref="AUDIT" />
159 </appender>
160
161 <appender name="translog"
162 class="ch.qos.logback.core.rolling.RollingFileAppender">
163 <filter class="ch.qos.logback.classic.filter.LevelFilter">
164 <level>DEBUG</level>
165 <onMatch>ACCEPT</onMatch>
166 <onMismatch>DENY</onMismatch>
167 </filter>
168 <file>${logDirectory}/rest/translog.log</file>
169 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
170 <fileNamePattern>${logDirectory}/rest/translog.log.%d{yyyy-MM-dd}
171 </fileNamePattern>
172 </rollingPolicy>
173 <encoder>
174 <pattern>${transLogPattern}</pattern>
175 </encoder>
176 </appender>
177
178 <appender name="asynctranslog" class="ch.qos.logback.classic.AsyncAppender">
179 <queueSize>1000</queueSize>
180 <includeCallerData>true</includeCallerData>
181 <appender-ref ref="translog" />
182 </appender>
183
184 <appender name="dmaapAAIEventConsumer"
185 class="ch.qos.logback.core.rolling.RollingFileAppender">
186 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
187 <level>WARN</level>
188 </filter>
189 <File>${logDirectory}/dmaapAAIEventConsumer/error.log</File>
190 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
191 <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/error.log.%d{yyyy-MM-dd}
192 </fileNamePattern>
193 </rollingPolicy>
194 <encoder>
195 <pattern>${errorPattern}</pattern>
196 </encoder>
197
198 </appender>
199
200 <appender name="dmaapAAIEventConsumerDebug"
201 class="ch.qos.logback.core.rolling.RollingFileAppender">
202 <filter class="ch.qos.logback.classic.filter.LevelFilter">
203 <level>DEBUG</level>
204 <onMatch>ACCEPT</onMatch>
205 <onMismatch>DENY</onMismatch>
206 </filter>
207 <File>${logDirectory}/dmaapAAIEventConsumer/debug.log</File>
208 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
209 <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/debug.log.%d{yyyy-MM-dd}
210 </fileNamePattern>
211 </rollingPolicy>
212 <encoder>
213 <pattern>${debugPattern}</pattern>
214 </encoder>
215 </appender>
216 <appender name="dmaapAAIEventConsumerInfo"
217 class="ch.qos.logback.core.rolling.RollingFileAppender">
218 <filter class="ch.qos.logback.classic.filter.LevelFilter">
219 <level>INFO</level>
220 <onMatch>ACCEPT</onMatch>
221 <onMismatch>DENY</onMismatch>
222 </filter>
223 <File>${logDirectory}/dmaapAAIEventConsumer/dmaap-transaction.log</File>
224 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
225 <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/dmaap-transaction.log.%d{yyyy-MM-dd}
226 </fileNamePattern>
227 </rollingPolicy>
228 <encoder>
229 <pattern>${auditPattern}</pattern>
230 </encoder>
231 </appender>
232 <appender name="dmaapAAIEventConsumerMetric"
233 class="ch.qos.logback.core.rolling.RollingFileAppender">
234 <filter class="ch.qos.logback.classic.filter.LevelFilter">
235 <level>INFO</level>
236 <onMatch>ACCEPT</onMatch>
237 <onMismatch>DENY</onMismatch>
238 </filter>
239 <File>${logDirectory}/dmaapAAIEventConsumer/metrics.log</File>
240 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
241 <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/metrics.log.%d{yyyy-MM-dd}
242 </fileNamePattern>
243 </rollingPolicy>
244 <encoder>
245 <pattern>${metricPattern}</pattern>
246 </encoder>
247 </appender>
248 <appender name="external"
249 class="ch.qos.logback.core.rolling.RollingFileAppender">
250 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
251 <level>WARN</level>
252 </filter>
253 <file>${logDirectory}/external/external.log</file>
254 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
255 <fileNamePattern>${logDirectory}/external/external.log.%d{yyyy-MM-dd}
256 </fileNamePattern>
257 </rollingPolicy>
258 <encoder>
259 <pattern>${debugPattern}</pattern>
260 </encoder>
261 </appender>
262 <appender name="auth"
263 class="ch.qos.logback.core.rolling.RollingFileAppender">
264 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
265 <level>DEBUG</level>
266 </filter>
267 <file>${logDirectory}/auth/auth.log</file>
268 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
269 <fileNamePattern>${logDirectory}/auth/auth.log.%d{yyyy-MM-dd}
270 </fileNamePattern>
271 </rollingPolicy>
272 <encoder>
273 <pattern>%d{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}[%thread] %-5level %logger{1024} - %msg%n</pattern>
274 </encoder>
275 </appender>
276 <appender name="asyncAUTH" class="ch.qos.logback.classic.AsyncAppender">
277 <queueSize>1000</queueSize>
278 <includeCallerData>true</includeCallerData>
279 <appender-ref ref="auth" />
280 </appender>
281 <!-- logback internals logging -->
282
283 <logger name="ch.qos.logback.classic" level="WARN" />
284 <logger name="ch.qos.logback.core" level="WARN" />
285
286 <logger name="com.att.aft.dme2" level="WARN" />
287 <logger name="com.jayway.jsonpath" level="WARN" />
288
289 <logger name="org.apache" level="OFF" />
290 <logger name="org.apache.commons" level="WARN" />
291 <logger name="org.apache.zookeeper" level="OFF" />
292 <logger name="org.codehaus.groovy" level="WARN" />
293 <logger name="org.eclipse.jetty" level="WARN" />
294 <!-- Spring related loggers -->
295 <logger name="org.springframework" level="WARN" />
296 <logger name="org.springframework.beans" level="WARN" />
297 <logger name="org.springframework.web" level="WARN" />
298 <logger name="org.janusgraph" level="WARN" />
299 <logger name="org.zookeeper" level="OFF" />
300
301
302 <logger name="org.onap.aai" level="DEBUG" additivity="false">
303 <appender-ref ref="asyncDEBUG" />
304 <appender-ref ref="asyncSANE" />
305 <appender-ref ref="STDOUT" />
306 </logger>
307 <logger name="org.onap.aai.aaf.auth" level="DEBUG" additivity="false">
308 <appender-ref ref="asyncAUTH" />
309 <appender-ref ref="STDOUT" />
310 </logger>
311 <logger name="org.onap.aai.aailog.logs.AaiScheduledTaskAuditLog" level="INFO">
312 <appender-ref ref="asyncAUDIT"/>
313 </logger>
314 <logger name="org.onap.logging.filter.base.AbstractAuditLogFilter" level="INFO">
315 <appender-ref ref="asyncAUDIT"/>
316 </logger>
317 <logger name="org.onap.aai.aailog.logs.AaiDBMetricLog" level="INFO">
318 <appender-ref ref="asyncMETRIC"/>
319 </logger>
320 <logger name="org.onap.aai.aailog.logs.AaiDmaapMetricLog" level="INFO">
321 <appender-ref ref="dmaapAAIEventConsumerMetric"/>
322 </logger>
323 <logger name="org.onap.aai.logging.ErrorLogHelper" level="WARN">
324 <appender-ref ref="asyncERROR"/>
325 </logger>
326 <logger name="org.onap.aai.interceptors.post" level="DEBUG" additivity="false">
327 <appender-ref ref="asynctranslog" />
328 <appender-ref ref="STDOUT" />
329 </logger>
330
331 <logger name="org.onap.aai.dmaap" level="DEBUG" additivity="false">
332 <appender-ref ref="dmaapAAIEventConsumer" />
333 <appender-ref ref="dmaapAAIEventConsumerDebug" />
334 </logger>
335
336 <logger name="com.att.nsa.mr" level="INFO" >
337 <appender-ref ref="dmaapAAIEventConsumerInfo" />
338 </logger>
339
340 <root level="DEBUG">
341 <appender-ref ref="external" />
342 <appender-ref ref="STDOUT" />
343 </root>
344</configuration>