1 <?xml version="1.0" encoding="UTF-8"?>
3 ================================================================================
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
12 http://www.apache.org/licenses/LICENSE-2.0
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 ================================================================================
21 <configuration scan="true" scanPeriod="3 seconds" debug="true">
22 <!-- specify the base path of the log directory -->
23 <property name="logDir" value="/var/log/onap" />
24 <!-- specify the component name -->
25 <property name="componentName" value="vid" />
26 <!-- The directory where logs are written -->
27 <property name="logDirectory" value="${logDir}/${componentName}" />
28 <property name="pattern" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, UTC}\t[%thread]\t%-5level\t%logger{36}\t%replace(%replace(%replace(%mdc){'\t','\\\\t'}){', ','\t'}){'\n', '\\\\n'}\t%replace(%replace(%msg){'\n', '\\\\n'}){'\t','\\\\t'}%n" />
29 <!-- log file names -->
30 <property name="generalLogName" value="application" />
31 <property name="errorLogName" value="error" />
32 <property name="metricsLogName" value="metrics" />
33 <property name="auditLogName" value="audit" />
34 <property name="debugLogName" value="debug" />
35 <!-- other constants -->
36 <property name="queueSize" value="256" />
37 <property name="maxFileSize" value="50MB" />
38 <property name="maxHistory" value="30" />
39 <property name="totalSizeCap" value="10GB" />
40 <!-- Example evaluator filter applied against console appender -->
41 <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
43 <pattern>${pattern}</pattern>
46 <!-- ============================================================================ -->
47 <!-- EELF Appenders -->
48 <!-- ============================================================================ -->
49 <!-- The EELFAppender is used to record events to the general application
51 <appender name="EELF" class="ch.qos.logback.core.rolling.RollingFileAppender">
52 <file>${logDirectory}/${generalLogName}.log</file>
53 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
54 <fileNamePattern>${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
55 <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
56 <maxFileSize>${maxFileSize}</maxFileSize>
57 </timeBasedFileNamingAndTriggeringPolicy>
58 <maxHistory>${maxHistory}</maxHistory>
59 <totalSizeCap>${totalSizeCap}</totalSizeCap>
62 <pattern>${pattern}</pattern>
64 <filter class="org.openecomp.portalapp.util.CustomLoggingFilter" />
66 <appender name="asyncEELF" class="ch.qos.logback.classic.AsyncAppender">
67 <queueSize>${queueSize}</queueSize>
68 <includeCallerData>true</includeCallerData>
69 <appender-ref ref="EELF" />
71 <!-- EELF Security Appender. This appender is used to record security events
72 to the security log file. Security events are separate from other loggers
73 in EELF so that security log records can be captured and managed in a secure
74 way separate from the other logs. This appender is set to never discard any
77 <appender name="EELFSecurity"
78 class="ch.qos.logback.core.rolling.RollingFileAppender">
79 <file>${logDirectory}/${securityLogName}.log</file>
81 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
82 <fileNamePattern>${logDirectory}/${securityLogName}.%i.log.zip
84 <minIndex>1</minIndex>
85 <maxIndex>9</maxIndex>
88 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
89 <maxFileSize>5MB</maxFileSize>
92 <pattern>${defaultPattern}</pattern>
96 <appender name="asyncEELFSecurity" class="ch.qos.logback.classic.AsyncAppender">
97 <queueSize>256</queueSize>
98 <discardingThreshold>0</discardingThreshold>
99 <appender-ref ref="EELFSecurity" />
102 <!-- EELF Performance Appender. This appender is used to record performance
105 <appender name="EELFPerformance"
106 class="ch.qos.logback.core.rolling.RollingFileAppender">
107 <file>${logDirectory}/${performanceLogName}.log</file>
109 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
110 <fileNamePattern>${logDirectory}/${performanceLogName}.%i.log.zip
112 <minIndex>1</minIndex>
113 <maxIndex>9</maxIndex>
116 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
117 <maxFileSize>5MB</maxFileSize>
120 <outputPatternAsHeader>true</outputPatternAsHeader>
121 <pattern>${defaultPattern}</pattern>
124 <appender name="asyncEELFPerformance" class="ch.qos.logback.classic.AsyncAppender">
125 <queueSize>256</queueSize>
126 <appender-ref ref="EELFPerformance" />
129 <!-- EELF Server Appender. This appender is used to record Server related
130 logging events. The Server logger and appender are specializations of the
131 EELF application root logger and appender. This can be used to segregate Server
132 events from other components, or it can be eliminated to record these events
133 as part of the application root log. -->
135 <appender name="EELFServer"
136 class="ch.qos.logback.core.rolling.RollingFileAppender">
137 <file>${logDirectory}/${serverLogName}.log</file>
139 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
140 <fileNamePattern>${logDirectory}/${serverLogName}.%i.log.zip
142 <minIndex>1</minIndex>
143 <maxIndex>9</maxIndex>
146 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
147 <maxFileSize>5MB</maxFileSize>
150 <pattern>${defaultPattern}</pattern>
153 <appender name="asyncEELFServer" class="ch.qos.logback.classic.AsyncAppender">
154 <queueSize>256</queueSize>
155 <appender-ref ref="EELFServer" />
158 <!-- EELF Policy Appender. This appender is used to record Policy engine
159 related logging events. The Policy logger and appender are specializations
160 of the EELF application root logger and appender. This can be used to segregate
161 Policy engine events from other components, or it can be eliminated to record
162 these events as part of the application root log. -->
164 <appender name="EELFPolicy"
165 class="ch.qos.logback.core.rolling.RollingFileAppender">
166 <file>${logDirectory}/${policyLogName}.log</file>
168 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
169 <fileNamePattern>${logDirectory}/${policyLogName}.%i.log.zip
171 <minIndex>1</minIndex>
172 <maxIndex>9</maxIndex>
175 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
176 <maxFileSize>5MB</maxFileSize>
179 <pattern>${defaultPattern}</pattern>
182 <appender name="asyncEELFPolicy" class="ch.qos.logback.classic.AsyncAppender">
183 <queueSize>256</queueSize>
184 <appender-ref ref="EELFPolicy" />
187 <!-- EELF Audit Appender. This appender is used to record audit engine
188 related logging events. The audit logger and appender are specializations
189 of the EELF application root logger and appender. This can be used to segregate
190 Policy engine events from other components, or it can be eliminated to record
191 these events as part of the application root log. -->
192 <appender name="EELFAudit" class="ch.qos.logback.core.rolling.RollingFileAppender">
193 <file>${logDirectory}/${auditLogName}.log</file>
194 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
195 <fileNamePattern>${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
196 <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
197 <maxFileSize>${maxFileSize}</maxFileSize>
198 </timeBasedFileNamingAndTriggeringPolicy>
199 <maxHistory>${maxHistory}</maxHistory>
200 <totalSizeCap>${totalSizeCap}</totalSizeCap>
203 <pattern>${pattern}</pattern>
206 <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender">
207 <queueSize>${queueSize}</queueSize>
208 <appender-ref ref="EELFAudit" />
210 <appender name="EELFMetrics" class="ch.qos.logback.core.rolling.RollingFileAppender">
211 <file>${logDirectory}/${metricsLogName}.log</file>
212 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
213 <fileNamePattern>${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
214 <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
215 <maxFileSize>${maxFileSize}</maxFileSize>
216 </timeBasedFileNamingAndTriggeringPolicy>
217 <maxHistory>${maxHistory}</maxHistory>
218 <totalSizeCap>${totalSizeCap}</totalSizeCap>
221 <pattern>${pattern}</pattern>
224 <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender">
225 <queueSize>${queueSize}</queueSize>
226 <appender-ref ref="EELFMetrics" />
228 <appender name="EELFError" class="ch.qos.logback.core.rolling.RollingFileAppender">
229 <file>${logDirectory}/${errorLogName}.log</file>
230 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
231 <fileNamePattern>${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
232 <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
233 <maxFileSize>${maxFileSize}</maxFileSize>
234 </timeBasedFileNamingAndTriggeringPolicy>
235 <maxHistory>${maxHistory}</maxHistory>
236 <totalSizeCap>${totalSizeCap}</totalSizeCap>
239 <pattern>${pattern}</pattern>
242 <appender name="asyncEELFError" class="ch.qos.logback.classic.AsyncAppender">
243 <queueSize>${queueSize}</queueSize>
244 <appender-ref ref="EELFError" />
246 <appender name="EELFDebug" class="ch.qos.logback.core.rolling.RollingFileAppender">
247 <file>${logDirectory}/${debugLogName}.log</file>
248 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
249 <fileNamePattern>${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
250 <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
251 <maxFileSize>${maxFileSize}</maxFileSize>
252 </timeBasedFileNamingAndTriggeringPolicy>
253 <maxHistory>${maxHistory}</maxHistory>
254 <totalSizeCap>${totalSizeCap}</totalSizeCap>
257 <pattern>${pattern}</pattern>
260 <appender name="asyncEELFDebug" class="ch.qos.logback.classic.AsyncAppender">
261 <queueSize>${queueSize}</queueSize>
262 <appender-ref ref="EELFDebug" />
264 <!-- ============================================================================ -->
265 <!-- EELF loggers -->
266 <!-- ============================================================================ -->
267 <logger name="com.att.eelf" level="debug" additivity="false">
268 <appender-ref ref="asyncEELF" />
271 <logger name="com.att.eelf.security" level="info" additivity="false">
272 <appender-ref ref="asyncEELFSecurity" />
274 <logger name="com.att.eelf.perf" level="info" additivity="false">
275 <appender-ref ref="asyncEELFPerformance" />
277 <logger name="com.att.eelf.server" level="info" additivity="false">
278 <appender-ref ref="asyncEELFServer" />
280 <logger name="com.att.eelf.policy" level="info" additivity="false">
281 <appender-ref ref="asyncEELFPolicy" />
284 <logger name="com.att.eelf.audit" level="info" additivity="false">
285 <appender-ref ref="asyncEELFAudit" />
287 <logger name="com.att.eelf.metrics" level="info" additivity="false">
288 <appender-ref ref="asyncEELFMetrics" />
290 <logger name="com.att.eelf.error" level="info" additivity="false">
291 <appender-ref ref="asyncEELFError" />
293 <logger name="com.att.eelf.debug" level="debug" additivity="false">
294 <appender-ref ref="asyncEELFDebug" />
297 <appender-ref ref="asyncEELF" />