blob: 1f0a6a9df2afd9152a22386cf7d75abd70a785cc [file] [log] [blame]
jimmydot3982f4f2017-05-07 14:58:24 -04001<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 ================================================================================
4 eCOMP Portal SDK
5 ================================================================================
6 Copyright (C) 2017 AT&T Intellectual Property
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 ================================================================================
20 -->
21<configuration scan="true" scanPeriod="3 seconds" debug="true">
22 <!--
23 Logback files for the ECOMP SDK Application "ecomp_app"
24 are created in directory ${catalina.base}/logs/ecomp_app;
25 e.g., apache-tomcat-8.0.35/logs/ecomp_app/application.log
26 -->
27 <!--<jmxConfigurator /> -->
28
29 <!-- specify the component name -->
30 <property name="componentName" value="ep_sdk_app"></property>
31
32 <!-- specify the base path of the log directory -->
33 <property name="logDirPrefix" value="${catalina.base}/logs"></property>
34
35 <!-- The directories where logs are written -->
36 <property name="logDirectory" value="${logDirPrefix}/${componentName}" />
37 <!-- Can easily relocate debug logs by modifying this path. -->
38 <property name="debugLogDirectory" value="${logDirPrefix}/${componentName}" />
39
40 <!-- log file names -->
41 <property name="generalLogName" value="application" />
42 <property name="errorLogName" value="error" />
43 <property name="metricsLogName" value="metrics" />
44 <property name="auditLogName" value="audit" />
45 <property name="debugLogName" value="debug" />
46 <!--
47 These loggers are not used in code (yet).
48 <property name="securityLogName" value="security" />
49 <property name="policyLogName" value="policy" />
50 <property name="performanceLogName" value="performance" />
51 <property name="serverLogName" value="server" />
52 -->
53
54 <!-- 1610 Logging Fields Format Revisions -->
55 <property name="auditLoggerPattern"
56 value="%X{AuditLogBeginTimestamp}|%X{AuditLogEndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{VirtualServerName}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{Timer}|%X{ServerFQDN}|%X{ClientIPAddress}|%X{ClassName}|%X{Unused}|%X{ProcessKey}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}| %msg%n" />
57
58 <property name="metricsLoggerPattern"
59 value="%X{MetricsLogBeginTimestamp}|%X{MetricsLogEndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{VirtualServerName}|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{Timer}|%X{ServerFQDN}|%X{ClientIPAddress}|%X{ClassName}|%X{Unused}|%X{ProcessKey}|%X{TargetVisualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}| %msg%n" />
60
61 <property name="errorLoggerPattern"
62 value="%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{ClassName}|%X{AlertSeverity}|%X{ErrorCode}|%X{ErrorDescription}| %msg%n" />
63
64 <property name="defaultLoggerPattern"
65 value="%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%thread|%X{ClassName}| %msg%n" />
66
67 <!-- use %class so library logging calls yield their class name -->
68 <property name="applicationLoggerPattern"
69 value="%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%thread|%class{36}| %msg%n" />
70
71 <!-- Example evaluator filter applied against console appender -->
72 <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
73 <encoder>
74 <pattern>${defaultLoggerPattern}</pattern>
75 </encoder>
76 </appender>
77
78 <!-- ============================================================================ -->
79 <!-- EELF Appenders -->
80 <!-- ============================================================================ -->
81
82 <!-- The EELFAppender is used to record events to the general application
83 log -->
84
85
86 <appender name="EELF"
87 class="ch.qos.logback.core.rolling.RollingFileAppender">
88 <file>${logDirectory}/${generalLogName}.log</file>
89 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
90 <!-- daily rollover -->
91 <fileNamePattern>${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.log.zip</fileNamePattern>
92
93 <!-- keep 30 days' worth of history capped at 3GB total size -->
94 <maxHistory>30</maxHistory>
95 <totalSizeCap>3GB</totalSizeCap>
96
97 </rollingPolicy>
98 <encoder>
99 <pattern>${applicationLoggerPattern}</pattern>
100 </encoder>
101 <filter class="org.openecomp.portalapp.util.CustomLoggingFilter" />
102 </appender>
103
104 <appender name="asyncEELF" class="ch.qos.logback.classic.AsyncAppender">
105 <queueSize>256</queueSize>
106 <!-- Class name is part of caller data -->
107 <includeCallerData>true</includeCallerData>
108 <appender-ref ref="EELF" />
109 </appender>
110
111 <!-- EELF Security Appender. This appender is used to record security events
112 to the security log file. Security events are separate from other loggers
113 in EELF so that security log records can be captured and managed in a secure
114 way separate from the other logs. This appender is set to never discard any
115 events. -->
116 <!--
117 <appender name="EELFSecurity"
118 class="ch.qos.logback.core.rolling.RollingFileAppender">
119 <file>${logDirectory}/${securityLogName}.log</file>
120 <rollingPolicy
121 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
122 <fileNamePattern>${logDirectory}/${securityLogName}.%i.log.zip
123 </fileNamePattern>
124 <minIndex>1</minIndex>
125 <maxIndex>9</maxIndex>
126 </rollingPolicy>
127 <triggeringPolicy
128 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
129 <maxFileSize>5MB</maxFileSize>
130 </triggeringPolicy>
131 <encoder>
132 <pattern>${defaultPattern}</pattern>
133 </encoder>
134 </appender>
135
136 <appender name="asyncEELFSecurity" class="ch.qos.logback.classic.AsyncAppender">
137 <queueSize>256</queueSize>
138 <discardingThreshold>0</discardingThreshold>
139 <appender-ref ref="EELFSecurity" />
140 </appender>
141 -->
142
143 <!-- EELF Performance Appender. This appender is used to record performance
144 records. -->
145 <!--
146 <appender name="EELFPerformance"
147 class="ch.qos.logback.core.rolling.RollingFileAppender">
148 <file>${logDirectory}/${performanceLogName}.log</file>
149 <rollingPolicy
150 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
151 <fileNamePattern>${logDirectory}/${performanceLogName}.%i.log.zip
152 </fileNamePattern>
153 <minIndex>1</minIndex>
154 <maxIndex>9</maxIndex>
155 </rollingPolicy>
156 <triggeringPolicy
157 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
158 <maxFileSize>5MB</maxFileSize>
159 </triggeringPolicy>
160 <encoder>
161 <outputPatternAsHeader>true</outputPatternAsHeader>
162 <pattern>${defaultPattern}</pattern>
163 </encoder>
164 </appender>
165 <appender name="asyncEELFPerformance" class="ch.qos.logback.classic.AsyncAppender">
166 <queueSize>256</queueSize>
167 <appender-ref ref="EELFPerformance" />
168 </appender>
169 -->
170
171 <!-- EELF Server Appender. This appender is used to record Server related
172 logging events. The Server logger and appender are specializations of the
173 EELF application root logger and appender. This can be used to segregate Server
174 events from other components, or it can be eliminated to record these events
175 as part of the application root log. -->
176 <!--
177 <appender name="EELFServer"
178 class="ch.qos.logback.core.rolling.RollingFileAppender">
179 <file>${logDirectory}/${serverLogName}.log</file>
180 <rollingPolicy
181 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
182 <fileNamePattern>${logDirectory}/${serverLogName}.%i.log.zip
183 </fileNamePattern>
184 <minIndex>1</minIndex>
185 <maxIndex>9</maxIndex>
186 </rollingPolicy>
187 <triggeringPolicy
188 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
189 <maxFileSize>5MB</maxFileSize>
190 </triggeringPolicy>
191 <encoder>
192 <pattern>${defaultPattern}</pattern>
193 </encoder>
194 </appender>
195 <appender name="asyncEELFServer" class="ch.qos.logback.classic.AsyncAppender">
196 <queueSize>256</queueSize>
197 <appender-ref ref="EELFServer" />
198 </appender>
199 -->
200
201 <!-- EELF Policy Appender. This appender is used to record Policy engine
202 related logging events. The Policy logger and appender are specializations
203 of the EELF application root logger and appender. This can be used to segregate
204 Policy engine events from other components, or it can be eliminated to record
205 these events as part of the application root log. -->
206 <!--
207 <appender name="EELFPolicy"
208 class="ch.qos.logback.core.rolling.RollingFileAppender">
209 <file>${logDirectory}/${policyLogName}.log</file>
210 <rollingPolicy
211 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
212 <fileNamePattern>${logDirectory}/${policyLogName}.%i.log.zip
213 </fileNamePattern>
214 <minIndex>1</minIndex>
215 <maxIndex>9</maxIndex>
216 </rollingPolicy>
217 <triggeringPolicy
218 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
219 <maxFileSize>5MB</maxFileSize>
220 </triggeringPolicy>
221 <encoder>
222 <pattern>${defaultPattern}</pattern>
223 </encoder>
224 </appender>
225 <appender name="asyncEELFPolicy" class="ch.qos.logback.classic.AsyncAppender">
226 <queueSize>256</queueSize>
227 <appender-ref ref="EELFPolicy" />
228 </appender>
229 -->
230
231 <!-- EELF Audit Appender. This appender is used to record audit engine
232 related logging events. The audit logger and appender are specializations
233 of the EELF application root logger and appender. This can be used to segregate
234 Policy engine events from other components, or it can be eliminated to record
235 these events as part of the application root log. -->
236
237 <appender name="EELFAudit"
238 class="ch.qos.logback.core.rolling.RollingFileAppender">
239 <file>${logDirectory}/${auditLogName}.log</file>
240 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
241 <!-- daily rollover -->
242 <fileNamePattern>${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.log.zip</fileNamePattern>
243
244 <!-- keep 30 days' worth of history capped at 3GB total size -->
245 <maxHistory>30</maxHistory>
246 <totalSizeCap>3GB</totalSizeCap>
247
248 </rollingPolicy>
249 <encoder>
250 <pattern>${auditLoggerPattern}</pattern>
251 </encoder>
252 </appender>
253 <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender">
254 <queueSize>256</queueSize>
255 <appender-ref ref="EELFAudit" />
256 </appender>
257
258 <appender name="EELFMetrics"
259 class="ch.qos.logback.core.rolling.RollingFileAppender">
260 <file>${logDirectory}/${metricsLogName}.log</file>
261 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
262 <!-- daily rollover -->
263 <fileNamePattern>${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.log.zip</fileNamePattern>
264
265 <!-- keep 30 days' worth of history capped at 3GB total size -->
266 <maxHistory>30</maxHistory>
267 <totalSizeCap>3GB</totalSizeCap>
268
269 </rollingPolicy>
270 <encoder>
271 <pattern>${metricsLoggerPattern}</pattern>
272 </encoder>
273 </appender>
274
275
276 <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender">
277 <queueSize>256</queueSize>
278 <appender-ref ref="EELFMetrics"/>
279 </appender>
280
281 <appender name="EELFError"
282 class="ch.qos.logback.core.rolling.RollingFileAppender">
283 <file>${logDirectory}/${errorLogName}.log</file>
284 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
285 <!-- daily rollover -->
286 <fileNamePattern>${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.log.zip</fileNamePattern>
287
288 <!-- keep 30 days' worth of history capped at 3GB total size -->
289 <maxHistory>30</maxHistory>
290 <totalSizeCap>3GB</totalSizeCap>
291
292 </rollingPolicy>
293 <encoder>
294 <pattern>${errorLoggerPattern}</pattern>
295 </encoder>
296 </appender>
297
298 <appender name="asyncEELFError" class="ch.qos.logback.classic.AsyncAppender">
299 <queueSize>256</queueSize>
300 <appender-ref ref="EELFError"/>
301 </appender>
302
303 <appender name="EELFDebug"
304 class="ch.qos.logback.core.rolling.RollingFileAppender">
305 <file>${debugLogDirectory}/${debugLogName}.log</file>
306 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
307 <!-- daily rollover -->
308 <fileNamePattern>${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.log.zip</fileNamePattern>
309
310 <!-- keep 30 days' worth of history capped at 3GB total size -->
311 <maxHistory>30</maxHistory>
312 <totalSizeCap>3GB</totalSizeCap>
313
314 </rollingPolicy>
315 <encoder>
316 <pattern>${defaultLoggerPattern}</pattern>
317 </encoder>
318 </appender>
319
320 <appender name="asyncEELFDebug" class="ch.qos.logback.classic.AsyncAppender">
321 <queueSize>256</queueSize>
322 <appender-ref ref="EELFDebug" />
323 </appender>
324
325
326 <!-- ============================================================================ -->
327 <!-- EELF loggers -->
328 <!-- ============================================================================ -->
329 <logger name="com.att.eelf" level="debug" additivity="false">
330 <appender-ref ref="asyncEELF" />
331 </logger>
332
333 <!--
334 <logger name="com.att.eelf.security" level="info" additivity="false">
335 <appender-ref ref="asyncEELFSecurity" />
336 </logger>
337 <logger name="com.att.eelf.perf" level="info" additivity="false">
338 <appender-ref ref="asyncEELFPerformance" />
339 </logger>
340 <logger name="com.att.eelf.server" level="info" additivity="false">
341 <appender-ref ref="asyncEELFServer" />
342 </logger>
343 <logger name="com.att.eelf.policy" level="info" additivity="false">
344 <appender-ref ref="asyncEELFPolicy" />
345 </logger>
346 -->
347
348 <logger name="com.att.eelf.audit" level="info" additivity="false">
349 <appender-ref ref="asyncEELFAudit" />
350 </logger>
351
352 <logger name="com.att.eelf.metrics" level="info" additivity="false">
353 <appender-ref ref="asyncEELFMetrics" />
354 </logger>
355
356 <logger name="com.att.eelf.error" level="info" additivity="false">
357 <appender-ref ref="asyncEELFError" />
358 </logger>
359
360 <logger name="com.att.eelf.debug" level="debug" additivity="false">
361 <appender-ref ref="asyncEELFDebug" />
362 </logger>
363
364
365 <root level="DEBUG">
366 <appender-ref ref="asyncEELF" />
367 </root>
368
369</configuration>