blob: b1c1335302aeb61283727923c2bee7fbfe43396c [file] [log] [blame]
Michael Lando4d97d5f2017-06-17 22:40:44 +03001<?xml version="1.0" encoding="UTF-8"?>
2<configuration scan="true" scanPeriod="5 seconds">
3
4 <property scope="system" name="ECOMP-component-name" value="ASDC" />
5 <property scope="system" name="ECOMP-subcomponent-name" value="ASDC-BE" />
6 <property file="${config.home}/catalog-be/configuration.yaml" />
7 <property scope="context" name="enable-all-log" value="false" />
8
9 <!--statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" />
10 <include resource="asdc_debug_logback.xml"/-->
11
12 <!-- value used by pattern field list (| - is inter-field separator, || - unavailable or not applicable field value) (m - mandatory, o- optional)-->
13 <!--timestamp(m)| requestID(m)| serviceInstanceID(o)| threadID(m)| physicalServerName(o)| serviceName(m)| userID(m)| logLevel(m)| severity(o)| serverIpAddress(m)| serverName(m)| clientIpAddress(o)| className(m)| timer(o)| detailedMessage(o)-->
14 <property name="default-log-pattern"
15 value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{uuid}|%X{serviceInstanceID}|%thread||${ECOMP-subcomponent-name}|%X{userId}|%level|%X{alarmSeverity}|%X{localAddr}|${beFqdn}|%X{remoteAddr}|%logger{35}|%X{timer}|ActivityType=&lt;%M&gt;, Desc=&lt;%msg&gt;%n" />
16
17 <property name="asdc-debug-log-pattern" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%msg %n"/>
18
19 <!-- All log -->
20 <if condition='property("enable-all-log").equalsIgnoreCase("true")'>
21 <then>
22 <appender name="ALL_ROLLING"
23 class="ch.qos.logback.core.rolling.RollingFileAppender">
24 <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/all.log
25 </file>
26
27 <rollingPolicy
28 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
29 <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/all.log.%i
30 </fileNamePattern>
31 <minIndex>1</minIndex>
32 <maxIndex>10</maxIndex>
33 </rollingPolicy>
34
35 <triggeringPolicy
36 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
37 <maxFileSize>20MB</maxFileSize>
38 </triggeringPolicy>
39 <encoder>
40 <pattern>${default-log-pattern}</pattern>
41 </encoder>
42 </appender>
43
44 <appender name="ASYNC_ALL" class="ch.qos.logback.classic.AsyncAppender">
45 <appender-ref ref="ALL_ROLLING" />
46 </appender>
47 </then>
48 </if>
49
50 <!-- Error log -->
51 <appender name="ERROR_ROLLING"
52 class="ch.qos.logback.core.rolling.RollingFileAppender">
53 <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/Error.log
54 </file>
55
56 <!-- Audit messages filter - deny audit messages -->
57 <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
58 <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
59 <marker>AUDIT_MARKER</marker>
60 </evaluator>
61 <onMismatch>NEUTRAL</onMismatch>
62 <onMatch>DENY</onMatch>
63 </filter>
64
65 <!-- Transaction messages filter - deny Transaction messages -->
66 <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
67 <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
68 <marker>TRANSACTION_MARKER</marker>
69 </evaluator>
70 <onMismatch>NEUTRAL</onMismatch>
71 <onMatch>DENY</onMatch>
72 </filter>
73
74 <!-- deny all events with a level below INFO, that is TRACE and DEBUG -->
75 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
76 <level>INFO</level>
77 </filter>
78
79 <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
80 <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/Error.log.%i
81 </fileNamePattern>
82 <minIndex>1</minIndex>
83 <maxIndex>10</maxIndex>
84 </rollingPolicy>
85
86 <triggeringPolicy
87 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
88 <maxFileSize>20MB</maxFileSize>
89 </triggeringPolicy>
90 <encoder>
91 <pattern>${default-log-pattern}</pattern>
92 </encoder>
93 </appender>
94
95 <!-- Debug log -->
96 <appender name="DEBUG_ROLLING"
97 class="ch.qos.logback.core.rolling.RollingFileAppender">
98 <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/debug.log
99 </file>
100
101 <!-- No need to deny audit messages - they are INFO only, will be denied
102 anyway -->
103 <!-- Transaction messages filter - deny Transaction messages, there are
104 some DEBUG level messages among them -->
105 <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
106 <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
107 <marker>TRANSACTION_MARKER</marker>
108 </evaluator>
109 <onMismatch>NEUTRAL</onMismatch>
110 <onMatch>DENY</onMatch>
111 </filter>
112
113 <!-- accept DEBUG and TRACE level -->
114 <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
115 <evaluator class="ch.qos.logback.classic.boolex.GEventEvaluator">
116 <expression>
117 e.level.toInt() &lt;= DEBUG.toInt()
118 </expression>
119 </evaluator>
120 <OnMismatch>DENY</OnMismatch>
121 <OnMatch>NEUTRAL</OnMatch>
122 </filter>
123
124 <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
125 <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/debug.log.%i
126 </fileNamePattern>
127 <minIndex>1</minIndex>
128 <maxIndex>10</maxIndex>
129 </rollingPolicy>
130
131 <triggeringPolicy
132 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
133 <maxFileSize>20MB</maxFileSize>
134 </triggeringPolicy>
135 <encoder>
136 <pattern>${default-log-pattern}</pattern>
137 </encoder>
138 </appender>
139
140 <!-- Debug log -->
141 <appender name="MIGRATION_DEBUG_ROLLING"
142 class="ch.qos.logback.core.rolling.RollingFileAppender">
143 <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/cassandra2zusammen_migration_debug.log
144 </file>
145
146 <!-- No need to deny audit messages - they are INFO only, will be denied
147 anyway -->
148 <!-- Transaction messages filter - deny Transaction messages, there are
149 some DEBUG level messages among them -->
150 <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
151 <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
152 <marker>TRANSACTION_MARKER</marker>
153 </evaluator>
154 <onMismatch>NEUTRAL</onMismatch>
155 <onMatch>DENY</onMatch>
156 </filter>
157
158 <!-- accept DEBUG and TRACE level -->
159 <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
160 <evaluator class="ch.qos.logback.classic.boolex.GEventEvaluator">
161 <expression>
162 e.level.toInt() &lt;= DEBUG.toInt()
163 </expression>
164 </evaluator>
165 <OnMismatch>DENY</OnMismatch>
166 <OnMatch>NEUTRAL</OnMatch>
167 </filter>
168
169 <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
170 <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/debug_by_package.log.%i
171 </fileNamePattern>
172 <minIndex>1</minIndex>
173 <maxIndex>10</maxIndex>
174 </rollingPolicy>
175
176 <triggeringPolicy
177 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
178 <maxFileSize>20MB</maxFileSize>
179 </triggeringPolicy>
180 <encoder>
181 <pattern>${asdc-debug-log-pattern}</pattern>
182 </encoder>
183 </appender>
184
185 <!-- Audit log -->
186 <appender name="AUDIT_ROLLING"
187 class="ch.qos.logback.core.rolling.RollingFileAppender">
188
189 <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/audit.log
190 </file>
191
192 <!-- Audit messages filter - accept audit messages -->
193 <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
194 <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
195 <marker>AUDIT_MARKER</marker>
196 </evaluator>
197 <onMismatch>DENY</onMismatch>
198 <onMatch>ACCEPT</onMatch>
199 </filter>
200
201 <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
202 <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/audit.log.%i
203 </fileNamePattern>
204 <minIndex>1</minIndex>
205 <maxIndex>10</maxIndex>
206 </rollingPolicy>
207
208 <triggeringPolicy
209 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
210 <maxFileSize>20MB</maxFileSize>
211 </triggeringPolicy>
212 <encoder>
213 <pattern>${default-log-pattern}</pattern>
214 </encoder>
215 </appender>
216
217 <!-- SdncTransaction log -->
218 <appender name="TRANSACTION_ROLLING"
219 class="ch.qos.logback.core.rolling.RollingFileAppender">
220
221 <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/transaction.log
222 </file>
223
224 <!-- Transaction messages filter - accept audit messages -->
225 <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
226 <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
227 <marker>TRANSACTION_MARKER</marker>
228 </evaluator>
229 <onMismatch>DENY</onMismatch>
230 <onMatch>ACCEPT</onMatch>
231 </filter>
232
233 <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
234 <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/transaction.log.%i
235 </fileNamePattern>
236 <minIndex>1</minIndex>
237 <maxIndex>10</maxIndex>
238 </rollingPolicy>
239
240 <triggeringPolicy
241 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
242 <maxFileSize>20MB</maxFileSize>
243 </triggeringPolicy>
244 <encoder>
245 <pattern>${default-log-pattern}</pattern>
246 </encoder>
247 </appender>
248
249 <!-- Asynchronicity Configurations -->
250 <appender name="ASYNC_DEBUG" class="ch.qos.logback.classic.AsyncAppender">
251 <appender-ref ref="DEBUG_ROLLING" />
252 </appender>
253
254 <appender name="ASYNC_TRANSACTION" class="ch.qos.logback.classic.AsyncAppender">
255 <appender-ref ref="TRANSACTION_ROLLING" />
256 </appender>
257
258 <appender name="ASYNC_ERROR" class="ch.qos.logback.classic.AsyncAppender">
259 <appender-ref ref="ERROR_ROLLING" />
260 </appender>
261
262
263 <root level="INFO">
264 <appender-ref ref="ASYNC_ERROR" />
265 <appender-ref ref="ASYNC_DEBUG" />
266 <appender-ref ref="AUDIT_ROLLING" />
267 <appender-ref ref="ASYNC_TRANSACTION" />
268 <if condition='property("enable-all-log").equalsIgnoreCase("true")'>
269 <then>
270 <appender-ref ref="ALL_ROLLING" />
271 </then>
272 </if>
273 </root>
274
275 <logger name="org.openecomp.sdc" level="INFO" />
276
277 <logger name="org.openecomp.core" level="DEBUG" additivity="false">
278 <appender-ref ref="MIGRATION_DEBUG_ROLLING" />
279 </logger>
280</configuration>
281
282