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