blob: a827b09f63067d234693a96dd48dd6fcf4eb3184 [file] [log] [blame]
efiacor2123fec2022-12-09 13:40:55 +00001
2<!--
3 ============LICENSE_START==========================================
4 org.onap.dmaap
5 ===================================================================
6 Copyright © 2018 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 ECOMP is a trademark and service mark of AT&T Intellectual Property.
21-->
22
23<configuration scan="false" scanPeriod="3 seconds">
24 <!--<jmxConfigurator /> -->
25 <!-- directory path for all other type logs -->
26 <property name="logDir" value="logs" />
27 <!-- specify the component name -->
28 <property name="componentName" value="ONAP"/>
29
30 <!-- log file names -->
31 <property name="generalLogName" value="application" />
32 <property name="securityLogName" value="security" />
33 <property name="performanceLogName" value="performance" />
34 <property name="serverLogName" value="server" />
35 <property name="policyLogName" value="policy" />
36 <property name="errorLogName" value="error" />
37 <property name="metricsLogName" value="metrics" />
38 <property name="auditLogName" value="audit" />
39 <property name="debugLogName" value="debug" />
40
41 <property name="defaultPattern" value="%date{ISO8601,UTC}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{VirtualServerName}|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Timer}|%msg%n" />
42
43 <property name="auditLoggerPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%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{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Unused}|%X{ProcessKey}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" />
44 <property name="metricsLoggerPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%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{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Unused}|%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" />
45 <property name="errorLoggerPattern" value="%date{ISO8601,UTC}|%X{RequestId}|%thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%.-5level|%X{ErrorCode}|%X{ErrorDescription}|%msg%n" />
46 <property name="debugLoggerPattern" value="%date{ISO8601,UTC}|%X{RequestId}|%thread|%msg%n" />
47
48 <property name="logDirectory" value="${logDir}/${componentName}" />
49
50 <!-- Example evaluator filter applied against console appender -->
51 <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
52 <encoder>
53 <pattern>${defaultPattern}</pattern>
54 </encoder>
55 </appender>
56
57 <!-- ============================================================================ -->
58 <!-- EELF Appenders -->
59 <!-- ============================================================================ -->
60
61 <!-- The EELFAppender is used to record events to the general application
62 log -->
63
64
65 <appender name="EELF"
66 class="ch.qos.logback.core.rolling.RollingFileAppender">
67 <file>${logDirectory}/${generalLogName}.log</file>
68 <rollingPolicy
69 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
70 <fileNamePattern>${logDirectory}/${generalLogName}.%i.log.zip
71 </fileNamePattern>
72 <minIndex>1</minIndex>
73 <maxIndex>9</maxIndex>
74 </rollingPolicy>
75 <triggeringPolicy
76 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
77 <maxFileSize>50MB</maxFileSize>
78 </triggeringPolicy>
79 <encoder>
80 <pattern>${defaultPattern}</pattern>
81 </encoder>
82 </appender>
83
84 <appender name="asyncEELF" class="ch.qos.logback.classic.AsyncAppender">
85 <queueSize>256</queueSize>
86 <appender-ref ref="EELF" />
87 </appender>
88
89 <!-- EELF Security Appender. This appender is used to record security events
90 to the security log file. Security events are separate from other loggers
91 in EELF so that security log records can be captured and managed in a secure
92 way separate from the other logs. This appender is set to never discard any
93 events. -->
94 <appender name="EELFSecurity"
95 class="ch.qos.logback.core.rolling.RollingFileAppender">
96 <file>${logDirectory}/${securityLogName}.log</file>
97 <rollingPolicy
98 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
99 <fileNamePattern>${logDirectory}/${securityLogName}.%i.log.zip
100 </fileNamePattern>
101 <minIndex>1</minIndex>
102 <maxIndex>9</maxIndex>
103 </rollingPolicy>
104 <triggeringPolicy
105 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
106 <maxFileSize>50MB</maxFileSize>
107 </triggeringPolicy>
108 <encoder>
109 <pattern>${defaultPattern}</pattern>
110 </encoder>
111 </appender>
112
113 <appender name="asyncEELFSecurity" class="ch.qos.logback.classic.AsyncAppender">
114 <queueSize>256</queueSize>
115 <discardingThreshold>0</discardingThreshold>
116 <appender-ref ref="EELFSecurity" />
117 </appender>
118
119 <!-- EELF Performance Appender. This appender is used to record performance
120 records. -->
121 <appender name="EELFPerformance"
122 class="ch.qos.logback.core.rolling.RollingFileAppender">
123 <file>${logDirectory}/${performanceLogName}.log</file>
124 <rollingPolicy
125 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
126 <fileNamePattern>${logDirectory}/${performanceLogName}.%i.log.zip
127 </fileNamePattern>
128 <minIndex>1</minIndex>
129 <maxIndex>9</maxIndex>
130 </rollingPolicy>
131 <triggeringPolicy
132 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
133 <maxFileSize>50MB</maxFileSize>
134 </triggeringPolicy>
135 <encoder>
136 <pattern>${defaultPattern}</pattern>
137 </encoder>
138 </appender>
139 <appender name="asyncEELFPerformance" class="ch.qos.logback.classic.AsyncAppender">
140 <queueSize>256</queueSize>
141 <appender-ref ref="EELFPerformance" />
142 </appender>
143
144 <!-- EELF Server Appender. This appender is used to record Server related
145 logging events. The Server logger and appender are specializations of the
146 EELF application root logger and appender. This can be used to segregate Server
147 events from other components, or it can be eliminated to record these events
148 as part of the application root log. -->
149 <appender name="EELFServer"
150 class="ch.qos.logback.core.rolling.RollingFileAppender">
151 <file>${logDirectory}/${serverLogName}.log</file>
152 <rollingPolicy
153 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
154 <fileNamePattern>${logDirectory}/${serverLogName}.%i.log.zip
155 </fileNamePattern>
156 <minIndex>1</minIndex>
157 <maxIndex>9</maxIndex>
158 </rollingPolicy>
159 <triggeringPolicy
160 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
161 <maxFileSize>50MB</maxFileSize>
162 </triggeringPolicy>
163 <encoder>
164 <pattern>${defaultPattern}</pattern>
165 </encoder>
166 </appender>
167 <appender name="asyncEELFServer" class="ch.qos.logback.classic.AsyncAppender">
168 <queueSize>256</queueSize>
169 <appender-ref ref="EELFServer" />
170 </appender>
171
172
173 <!-- EELF Policy Appender. This appender is used to record Policy engine
174 related logging events. The Policy logger and appender are specializations
175 of the EELF application root logger and appender. This can be used to segregate
176 Policy engine events from other components, or it can be eliminated to record
177 these events as part of the application root log. -->
178 <appender name="EELFPolicy"
179 class="ch.qos.logback.core.rolling.RollingFileAppender">
180 <file>${logDirectory}/${policyLogName}.log</file>
181 <rollingPolicy
182 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
183 <fileNamePattern>${logDirectory}/${policyLogName}.%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>50MB</maxFileSize>
191 </triggeringPolicy>
192 <encoder>
193 <pattern>${defaultPattern}</pattern>
194 </encoder>
195 </appender>
196 <appender name="asyncEELFPolicy" class="ch.qos.logback.classic.AsyncAppender">
197 <queueSize>256</queueSize>
198 <appender-ref ref="EELFPolicy" />
199 </appender>
200
201
202 <!-- EELF Audit Appender. This appender is used to record audit engine
203 related logging events. The audit 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="EELFAudit"
209 class="ch.qos.logback.core.rolling.RollingFileAppender">
210 <file>${logDirectory}/${auditLogName}.log</file>
211 <rollingPolicy
212 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
213 <fileNamePattern>${logDirectory}/${auditLogName}.%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>50MB</maxFileSize>
221 </triggeringPolicy>
222 <encoder>
223 <pattern>${auditLoggerPattern}</pattern>
224 </encoder>
225 </appender>
226 <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender">
227 <queueSize>256</queueSize>
228 <appender-ref ref="EELFAudit" />
229 </appender>
230
231<appender name="EELFMetrics"
232 class="ch.qos.logback.core.rolling.RollingFileAppender">
233 <file>${logDirectory}/${metricsLogName}.log</file>
234 <rollingPolicy
235 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
236 <fileNamePattern>${logDirectory}/${metricsLogName}.%i.log.zip
237 </fileNamePattern>
238 <minIndex>1</minIndex>
239 <maxIndex>9</maxIndex>
240 </rollingPolicy>
241 <triggeringPolicy
242 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
243 <maxFileSize>50MB</maxFileSize>
244 </triggeringPolicy>
245 <encoder>
246 <pattern>${metricsLoggerPattern}</pattern>
247 </encoder>
248 </appender>
249
250
251 <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender">
252 <queueSize>256</queueSize>
253 <appender-ref ref="EELFMetrics"/>
254 </appender>
255
256 <appender name="EELFError"
257 class="ch.qos.logback.core.rolling.RollingFileAppender">
258 <file>${logDirectory}/${errorLogName}.log</file>
259 <rollingPolicy
260 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
261 <fileNamePattern>${logDirectory}/${errorLogName}.%i.log.zip
262 </fileNamePattern>
263 <minIndex>1</minIndex>
264 <maxIndex>9</maxIndex>
265 </rollingPolicy>
266 <triggeringPolicy
267 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
268 <maxFileSize>50MB</maxFileSize>
269 </triggeringPolicy>
270 <encoder>
271 <pattern>${errorLoggerPattern}</pattern>
272 </encoder>
273 </appender>
274
275 <appender name="asyncEELFError" class="ch.qos.logback.classic.AsyncAppender">
276 <queueSize>256</queueSize>
277 <appender-ref ref="EELFError"/>
278 </appender>
279
280 <appender name="EELFDebug"
281 class="ch.qos.logback.core.rolling.RollingFileAppender">
282 <file>${logDirectory}/${debugLogName}.log</file>
283 <rollingPolicy
284 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
285 <fileNamePattern>${logDirectory}/${debugLogName}.%i.log.zip
286 </fileNamePattern>
287 <minIndex>1</minIndex>
288 <maxIndex>9</maxIndex>
289 </rollingPolicy>
290 <triggeringPolicy
291 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
292 <maxFileSize>50MB</maxFileSize>
293 </triggeringPolicy>
294 <encoder>
295 <pattern>${debugLoggerPattern}</pattern>
296 </encoder>
297 </appender>
298
299 <appender name="asyncEELFDebug" class="ch.qos.logback.classic.AsyncAppender">
300 <queueSize>256</queueSize>
301 <appender-ref ref="EELFDebug" />
302 <includeCallerData>true</includeCallerData>
303 </appender>
304
305
306 <!-- ============================================================================ -->
307 <!-- EELF loggers -->
308 <!-- ============================================================================ -->
309 <logger name="com.att.eelf" level="info" additivity="false">
310 <appender-ref ref="asyncEELF" />
311 </logger>
312 <logger name="com.att.eelf.security" level="info" additivity="false">
313 <appender-ref ref="asyncEELFSecurity" />
314 </logger>
315 <logger name="com.att.eelf.perf" level="info" additivity="false">
316 <appender-ref ref="asyncEELFPerformance" />
317 </logger>
318 <logger name="com.att.eelf.server" level="info" additivity="false">
319 <appender-ref ref="asyncEELFServer" />
320 </logger>
321 <logger name="com.att.eelf.policy" level="info" additivity="false">
322 <appender-ref ref="asyncEELFPolicy" />
323 </logger>
324
325 <logger name="com.att.eelf.audit" level="info" additivity="false">
326 <appender-ref ref="asyncEELFAudit" />
327 </logger>
328
329 <logger name="com.att.eelf.metrics" level="info" additivity="false">
330 <appender-ref ref="asyncEELFMetrics" />
331 </logger>
332
333
334 <logger name="com.att.eelf.error" level="error" additivity="false">
335 <appender-ref ref="asyncEELFError" />
336 </logger>
337
338 <logger name="com.att.eelf.debug" level="debug" additivity="false">
339 <appender-ref ref="asyncEELFDebug" />
340 </logger>
341
342 <root level="ERROR">
343 <appender-ref ref="asyncEELF" />
344 <appender-ref ref="STDOUT" />
345 </root>
346</configuration>