blob: cfcd3c02e65af5a480e115ade9e259138a62d7ec [file] [log] [blame]
Sylvain Desbureaux47eb4d22020-12-10 12:15:27 +01001{{/*
Sylvain Desbureaux70070412020-11-09 21:58:48 +01002<!--
3
4 ============LICENSE_START=======================================================
5 org.onap.aai
6 ================================================================================
7 Copyright © 2017 AT&T Intellectual Property. All rights reserved.
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-->
Sylvain Desbureaux47eb4d22020-12-10 12:15:27 +010025*/}}
Sylvain Desbureaux70070412020-11-09 21:58:48 +010026<configuration scan="true" scanPeriod="60 seconds" debug="false">
27 <statusListener class="ch.qos.logback.core.status.NopStatusListener"/>
28
29 <property resource="application.properties"/>
30
31 <property name="namespace" value="aai-schema-service"/>
32
33 <property name="AJSC_HOME" value="${AJSC_HOME:-.}"/>
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|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n|\r\n', '^'}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/>
40 <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"/>
41 <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"/>
42 -->
43 <property name="p_tim" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, UTC}"/>
44 <property name="p_lvl" value="%level"/>
45 <property name="p_log" value="%logger"/>
46 <property name="p_mdc" value="%replace(%replace(%replace(%mdc){'\t','\\\\t'}){'\n', '\\\\n'}){'\\|', '!'}"/>
47 <property name="p_msg" value="%replace(%replace(%msg){'\t', '\\\\t'}){'\n','\\\\n'}"/>
48 <property name="p_exc" value="%replace(%replace(%rootException){'\t', '\\\\t'}){'\n','\\\\n'}"/>
49 <property name="p_mak" value="%replace(%replace(%marker){'\t', '\\\\t'}){'\n','\\\\n'}"/>
50 <property name="p_thr" value="%thread"/>
51 <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"/>
52 <!-- Patterns from onap demo -->
53 <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" />
54 <property name="debugPattern" value="%X{LogTimestamp}|%X{RequestID}|%msg\t${p_mdc}\t${p_msg}\t${p_exc}\t${p_mak}\t|^%n" />
55
56 <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" />
57 <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" />
58 <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"/>
59
60 <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>
61 <conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"/>
62 <conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/>
63 <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
64 <encoder>
65 <pattern>
66 %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}
67 </pattern>
68 </encoder>
69 </appender>
70
71 <appender name="SANE" class="ch.qos.logback.core.rolling.RollingFileAppender">
72 <file>${logDirectory}/rest/sane.log</file>
73 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
74 <fileNamePattern>${logDirectory}/rest/sane.log.%d{yyyy-MM-dd}</fileNamePattern>
75 </rollingPolicy>
76 <encoder>
77 <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n
78 </pattern>
79 </encoder>
80 </appender>
81
82 <appender name="asyncSANE" class="ch.qos.logback.classic.AsyncAppender">
83 <queueSize>1000</queueSize>
84 <includeCallerData>true</includeCallerData>
85 <appender-ref ref="SANE"/>
86 </appender>
87
88 <appender name="METRIC" class="ch.qos.logback.core.rolling.RollingFileAppender">
89 <file>${logDirectory}/rest/metrics.log</file>
90 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
91 <fileNamePattern>${logDirectory}/rest/metrics.log.%d{yyyy-MM-dd}</fileNamePattern>
92 </rollingPolicy>
93 <encoder>
94 <pattern>${metricPattern}</pattern>
95 </encoder>
96 </appender>
97 <appender name="asyncMETRIC" class="ch.qos.logback.classic.AsyncAppender">
98 <queueSize>1000</queueSize>
99 <includeCallerData>true</includeCallerData>
100 <appender-ref ref="METRIC"/>
101 </appender>
102
103 <appender name="DEBUG"
104 class="ch.qos.logback.core.rolling.RollingFileAppender">
105 <filter class="ch.qos.logback.classic.filter.LevelFilter">
106 <level>DEBUG</level>
107 <onMatch>ACCEPT</onMatch>
108 <onMismatch>DENY</onMismatch>
109 </filter>
110 <file>${logDirectory}/rest/debug.log</file>
111 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
112 <fileNamePattern>${logDirectory}/rest/debug.log.%d{yyyy-MM-dd}
113 </fileNamePattern>
114 </rollingPolicy>
115 <encoder>
116 <pattern>${debugPattern}</pattern>
117 </encoder>
118 </appender>
119
120 <appender name="asyncDEBUG" class="ch.qos.logback.classic.AsyncAppender">
121 <queueSize>1000</queueSize>
122 <appender-ref ref="DEBUG"/>
123 <includeCallerData>true</includeCallerData>
124 </appender>
125
126 <appender name="ERROR"
127 class="ch.qos.logback.core.rolling.RollingFileAppender">
128 <file>${logDirectory}/rest/error.log</file>
129 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
130 <fileNamePattern>${logDirectory}/rest/error.log.%d{yyyy-MM-dd}
131 </fileNamePattern>
132 </rollingPolicy>
133 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
134 <level>WARN</level>
135 </filter>
136 <encoder>
137 <pattern>${errorPattern}</pattern>
138 </encoder>
139 </appender>
140
141 <appender name="asyncERROR" class="ch.qos.logback.classic.AsyncAppender">
142 <queueSize>1000</queueSize>
143 <appender-ref ref="ERROR"/>
144 </appender>
145
146 <appender name="AUDIT"
147 class="ch.qos.logback.core.rolling.RollingFileAppender">
148 <file>${logDirectory}/rest/audit.log</file>
149 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
150 <fileNamePattern>${logDirectory}/rest/audit.log.%d{yyyy-MM-dd}
151 </fileNamePattern>
152 </rollingPolicy>
153 <encoder>
154 <pattern>${auditPattern}</pattern>
155 </encoder>
156 </appender>
157
158 <appender name="asyncAUDIT" class="ch.qos.logback.classic.AsyncAppender">
159 <queueSize>1000</queueSize>
160 <includeCallerData>true</includeCallerData>
161 <appender-ref ref="AUDIT"/>
162 </appender>
163
164 <appender name="translog"
165 class="ch.qos.logback.core.rolling.RollingFileAppender">
166 <filter class="ch.qos.logback.classic.filter.LevelFilter">
167 <level>DEBUG</level>
168 <onMatch>ACCEPT</onMatch>
169 <onMismatch>DENY</onMismatch>
170 </filter>
171 <file>${logDirectory}/rest/translog.log</file>
172 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
173 <fileNamePattern>${logDirectory}/rest/translog.log.%d{yyyy-MM-dd}
174 </fileNamePattern>
175 </rollingPolicy>
176 <encoder>
177 <pattern>${transLogPattern}</pattern>
178 </encoder>
179 </appender>
180
181 <appender name="asynctranslog" class="ch.qos.logback.classic.AsyncAppender">
182 <queueSize>1000</queueSize>
183 <includeCallerData>true</includeCallerData>
184 <appender-ref ref="translog"/>
185 </appender>
186
187 <appender name="external"
188 class="ch.qos.logback.core.rolling.RollingFileAppender">
189 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
190 <level>WARN</level>
191 </filter>
192 <file>${logDirectory}/external/external.log</file>
193 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
194 <fileNamePattern>${logDirectory}/external/external.log.%d{yyyy-MM-dd}
195 </fileNamePattern>
196 </rollingPolicy>
197 <encoder>
198 <pattern>${debugPattern}</pattern>
199 </encoder>
200 </appender>
201
202 <appender name="auth"
203 class="ch.qos.logback.core.rolling.RollingFileAppender">
204 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
205 <level>DEBUG</level>
206 </filter>
207 <file>${logDirectory}/auth/auth.log</file>
208 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
209 <fileNamePattern>${logDirectory}/auth/auth.log.%d{yyyy-MM-dd}
210 </fileNamePattern>
211 </rollingPolicy>
212 <encoder>
213 <pattern>%d{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}[%thread] %-5level %logger{1024} - %msg%n</pattern>
214 </encoder>
215 </appender>
216 <appender name="asyncAUTH" class="ch.qos.logback.classic.AsyncAppender">
217 <queueSize>1000</queueSize>
218 <includeCallerData>true</includeCallerData>
219 <appender-ref ref="auth" />
220 </appender>
221
222 <logger name="org.onap.aai" level="DEBUG" additivity="false">
223 <appender-ref ref="asyncDEBUG"/>
224 <appender-ref ref="asyncSANE"/>
225 <appender-ref ref="STDOUT"/>
226 </logger>
227
228 <!-- Spring related loggers -->
229 <logger name="org.springframework" level="WARN"/>
230 <logger name="org.springframework.beans" level="WARN"/>
231 <logger name="org.springframework.web" level="WARN"/>
232 <logger name="com.blog.spring.jms" level="WARN"/>
233 <logger name="com.jayway.jsonpath" level="WARN"/>
234
235 <!-- AJSC related loggers (DME2 Registration, csi logging, restlet, servlet
236 logging) -->
237 <logger name="org.codehaus.groovy" level="WARN"/>
238 <logger name="com.netflix.loadbalancer" level="WARN"/>
239
240 <logger name="org.apache.zookeeper" level="OFF"/>
241
242 <!-- Other Loggers that may help troubleshoot -->
243 <logger name="net.sf" level="WARN"/>
244 <logger name="org.apache.commons.httpclient" level="WARN"/>
245 <logger name="org.apache.commons" level="WARN"/>
246 <logger name="org.apache.coyote" level="WARN"/>
247 <logger name="org.apache.jasper" level="WARN"/>
248
249 <!-- Camel Related Loggers (including restlet/servlet/jaxrs/cxf logging.
250 May aid in troubleshooting) -->
251 <logger name="org.apache.camel" level="WARN"/>
252 <logger name="org.apache.cxf" level="WARN"/>
253 <logger name="org.apache.camel.processor.interceptor" level="WARN"/>
254 <logger name="org.apache.cxf.jaxrs.interceptor" level="WARN"/>
255 <logger name="org.apache.cxf.service" level="WARN"/>
256 <logger name="org.restlet" level="WARN"/>
257 <logger name="org.apache.camel.component.restlet" level="WARN"/>
258
259 <logger name="org.hibernate.validator" level="WARN"/>
260 <logger name="org.hibernate" level="WARN"/>
261 <logger name="org.hibernate.ejb" level="OFF"/>
262
263 <!-- logback internals logging -->
264 <logger name="ch.qos.logback.classic" level="WARN"/>
265 <logger name="ch.qos.logback.core" level="WARN"/>
266
267 <logger name="org.eclipse.jetty" level="WARN"/>
268
269 <logger name="org.onap.aai.aaf.auth" level="DEBUG" additivity="false">
270 <appender-ref ref="asyncAUTH" />
271 </logger>
272 <logger name="org.onap.aai.aailog.logs.AaiScheduledTaskAuditLog" level="INFO">
273 <appender-ref ref="asyncAUDIT"/>
274 </logger>
275
276 <logger name="org.onap.logging.filter.base.AbstractAuditLogFilter" level="INFO">
277 <appender-ref ref="asyncAUDIT"/>
278 </logger>
279
280 <logger name="org.onap.aai.logging.ErrorLogHelper" level="WARN">
281 <appender-ref ref="asyncERROR"/>
282 </logger>
283 <logger name="org.onap.aai.schemaservice.interceptors.post" level="DEBUG" additivity="false">
284 <appender-ref ref="asynctranslog" />
285 </logger>
286
287 <logger name="org.apache" level="OFF"/>
288 <logger name="org.zookeeper" level="OFF"/>
289 <logger name="org.janusgraph" level="WARN"/>
290 <logger name="com.att.aft.dme2" level="WARN"/>
291
292
293 <root level="DEBUG">
294 <appender-ref ref="STDOUT" />
295 <appender-ref ref="external"/>
296 </root>
297</configuration>