aboutsummaryrefslogtreecommitdiffstats
path: root/ajsc-aai/ajsc-shared-config/etc/logback.xml
blob: 103f38fb2c32cceff14acc8eb81415149cae9249 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
<configuration scan="true" scanPeriod="60 seconds" debug="false">
	<contextName>${module.ajsc.namespace.name}</contextName>
	<jmxConfigurator />
	<property name="logDirectory" value="${AJSC_HOME}/logs" />
	
	<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
		<filter class="ch.qos.logback.classic.filter.LevelFilter">
			<level>ERROR</level>
			<onMatch>ACCEPT</onMatch>
			<onMismatch>DENY</onMismatch>
		</filter>
		<encoder>
			<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n</pattern>
		</encoder>
	</appender>
	
	<appender name="METRIC"	class="ch.qos.logback.core.rolling.RollingFileAppender">
		<filter class="ch.qos.logback.classic.filter.LevelFilter">
			<level>INFO</level>
			<onMatch>ACCEPT</onMatch>
			<onMismatch>DENY</onMismatch>
		</filter>
		<file>${logDirectory}/rest/metrics.log</file>
		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
			<fileNamePattern>${logDirectory}/rest/metrics.log.%d{yyyy-MM-dd}</fileNamePattern>
		</rollingPolicy>
		<encoder>
			<pattern>%m%n</pattern>
		</encoder>
	</appender>
	<appender name="asyncMETRIC" class="ch.qos.logback.classic.AsyncAppender">
		<queueSize>1000</queueSize>
		<appender-ref ref="METRIC" />
	</appender>
	
	<appender name="DEBUG"	class="ch.qos.logback.core.rolling.RollingFileAppender">
		<filter class="ch.qos.logback.classic.filter.LevelFilter">
			<level>DEBUG</level>
			<onMatch>ACCEPT</onMatch>
			<onMismatch>DENY</onMismatch>
		</filter>
		<file>${logDirectory}/rest/debug.log</file>
		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
			<fileNamePattern>${logDirectory}/rest/debug.log.%d{yyyy-MM-dd}</fileNamePattern>
		</rollingPolicy>
		<encoder>
			<pattern>%m%n</pattern>
		</encoder>
	</appender>
	<appender name="asyncDEBUG" class="ch.qos.logback.classic.AsyncAppender">
		<queueSize>1000</queueSize>
		<appender-ref ref="DEBUG" />
	</appender>
	
	<appender name="ERROR"	class="ch.qos.logback.core.rolling.RollingFileAppender">
		<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
			<level>WARN</level>
		</filter>
		<file>${logDirectory}/rest/error.log</file>
		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
			<fileNamePattern>${logDirectory}/rest/error.log.%d{yyyy-MM-dd}</fileNamePattern>
		</rollingPolicy>
		<encoder>
			<pattern>%m%n</pattern>
		</encoder>
	</appender>
	<appender name="asyncERROR" class="ch.qos.logback.classic.AsyncAppender">
		<queueSize>1000</queueSize>
		<appender-ref ref="ERROR" />
	</appender>
	
	<appender name="AUDIT"	class="ch.qos.logback.core.rolling.RollingFileAppender">
		<file>${logDirectory}/rest/audit.log</file>
		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
			<fileNamePattern>${logDirectory}/rest/audit.log.%d{yyyy-MM-dd}</fileNamePattern>
		</rollingPolicy>
		<encoder>
			<pattern>%m%n</pattern>
		</encoder>
	</appender>
	<appender name="asyncAUDIT" class="ch.qos.logback.classic.AsyncAppender">
		<queueSize>1000</queueSize>
		<appender-ref ref="AUDIT" />
	</appender>
	
	<appender name="dmaapAAIWorkloadConsumer"	class="ch.qos.logback.core.rolling.RollingFileAppender">
		<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
			<level>WARN</level>
		</filter>
		<File>${logDirectory}/dmaapAAIWorkloadConsumer/error.log</File>
		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
			<fileNamePattern>${logDirectory}/dmaapAAIWorkloadConsumer/error.log.%d{yyyy-MM-dd}</fileNamePattern>
		</rollingPolicy>
		<encoder>
			<pattern>%m%n</pattern>
		</encoder>
	</appender>
	
	<appender name="dmaapAAIWorkloadConsumerdebug"	class="ch.qos.logback.core.rolling.RollingFileAppender">
		<filter class="ch.qos.logback.classic.filter.LevelFilter">
			<level>DEBUG</level>
			<onMatch>ACCEPT</onMatch>
			<onMismatch>DENY</onMismatch>
		</filter>
		<File>${logDirectory}/dmaapAAIWorkloadConsumer/debug.log</File>
		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
			<fileNamePattern>${logDirectory}/dmaapAAIWorkloadConsumer/debug.log.%d{yyyy-MM-dd}</fileNamePattern>
		</rollingPolicy>
		<encoder>
			<pattern>%m%n</pattern>
		</encoder>
	</appender>
	<appender name="dmaapAAIWorkloadConsumermetric"	class="ch.qos.logback.core.rolling.RollingFileAppender">
		<filter class="ch.qos.logback.classic.filter.LevelFilter">
			<level>INFO</level>
			<onMatch>ACCEPT</onMatch>
			<onMismatch>DENY</onMismatch>
		</filter>
		<File>${logDirectory}/dmaapAAIWorkloadConsumer/metrics.log</File>
		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
			<fileNamePattern>${logDirectory}/dmaapAAIWorkloadConsumer/metrics.log.%d{yyyy-MM-dd}</fileNamePattern>
		</rollingPolicy>
		<encoder>
			<pattern>%m%n</pattern>
		</encoder>
	</appender>
	
	<!-- Spring related loggers -->
	<logger name="org.springframework" level="WARN" />
	<logger name="org.springframework.beans" level="WARN" />
	<logger name="org.springframework.web" level="WARN" />
	<logger name="com.blog.spring.jms" level="WARN" />
	
	<!-- AJSC Services (bootstrap services) -->
	<logger name="ajsc" level="WARN" />
	<logger name="ajsc.RouteMgmtService" level="WARN" />
	<logger name="ajsc.ComputeService" level="WARN" />
	<logger name="ajsc.VandelayService" level="WARN" />
	<logger name="ajsc.FilePersistenceService" level="WARN" />
	<logger name="ajsc.UserDefinedJarService" level="WARN" />
	<logger name="ajsc.UserDefinedBeansDefService" level="WARN" />
	<logger name="ajsc.LoggingConfigurationService" level="WARN" />
	
	<!-- AJSC related loggers (DME2 Registration, csi logging, restlet, servlet 	logging) -->
	<logger name="ajsc.utils" level="WARN" />
	<logger name="ajsc.utils.DME2Helper" level="WARN" />
	<logger name="ajsc.filters" level="WARN" />
	<logger name="ajsc.beans.interceptors" level="WARN" />
	<logger name="ajsc.restlet" level="WARN" />
	<logger name="ajsc.servlet" level="WARN" />
	<logger name="com.att.ajsc" level="WARN" />
	
	<!-- Other Loggers that may help troubleshoot -->
	<logger name="net.sf" level="WARN" />
	<logger name="org.apache.commons.httpclient" level="WARN" />
	<logger name="org.apache.commons" level="WARN" />
	<logger name="org.apache.coyote" level="WARN" />
	<logger name="org.apache.jasper" level="WARN" />
	
	<!-- Camel Related Loggers (including restlet/servlet/jaxrs/cxf logging. 	May aid in troubleshooting) -->
	<logger name="org.apache.camel" level="WARN" />
	<logger name="org.apache.cxf" level="WARN" />
	<logger name="org.apache.camel.processor.interceptor" level="WARN" />
	<logger name="org.apache.cxf.jaxrs.interceptor" level="WARN" />
	<logger name="org.apache.cxf.service" level="WARN" />
	<logger name="org.restlet" level="WARN" />
	<logger name="org.apache.camel.component.restlet" level="WARN" />
	
	<!-- logback internals logging -->
	<logger name="ch.qos.logback.classic" level="WARN" />
	<logger name="ch.qos.logback.core" level="WARN" />
	
	<!-- logback jms appenders & loggers definition starts here -->
	<appender name="auditLogs"	class="ch.qos.logback.core.rolling.RollingFileAppender">
		<filter class="ch.qos.logback.classic.filter.ThresholdFilter"/>
		<file>${logDirectory}/perf-audit/Audit-${lrmRVer}-${lrmRO}-${Pid}.log</file>
		<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
			<fileNamePattern>${logDirectory}/perf-audit/Audit-${lrmRVer}-${lrmRO}-${Pid}.%i.log.zip</fileNamePattern>
			<minIndex>1</minIndex>
			<maxIndex>9</maxIndex>
		</rollingPolicy>
		<triggeringPolicy	class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
			<maxFileSize>5MB</maxFileSize>
		</triggeringPolicy>
		<encoder>
			<pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern>
		</encoder>
	</appender>
	<appender name="perfLogs"	class="ch.qos.logback.core.rolling.RollingFileAppender">
		<filter class="ch.qos.logback.classic.filter.ThresholdFilter"/>
		<file>${logDirectory}/perf-audit/Perform-${lrmRVer}-${lrmRO}-${Pid}.log</file>
		<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
			<fileNamePattern>${logDirectory}/perf-audit/Perform-${lrmRVer}-${lrmRO}-${Pid}.%i.log.zip</fileNamePattern>
			<minIndex>1</minIndex>
			<maxIndex>9</maxIndex>
		</rollingPolicy>
		<triggeringPolicy	class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
			<maxFileSize>5MB</maxFileSize>
		</triggeringPolicy>
		<encoder>
			<pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern>
		</encoder>
	</appender>
<!-- 	<if condition='property("JMS_BROKER").contains("WMQ")'>
		<then>
			<appender name="Audit-Record-Queue" class="ajsc.JMSQueueAppender">
				<param name="InitialContextFactoryName" value="${JMS_WMQ_INITIAL_CONNECTION_FACTORY_NAME}" />
				<param name="ProviderURL" value="${JMS_WMQ_PROVIDER_URL}" />
				<param name="DestinationName" value="${JMS_WMQ_AUDIT_DESTINATION_NAME}" />
				<param name="ConnectionFactoryName" value="${JMS_WMQ_CONNECTION_FACTORY_NAME}" />
			</appender>
			<appender name="Performance-Tracker-Queue" class="ajsc.JMSQueueAppender">
				<param name="InitialContextFactoryName" value="${JMS_WMQ_INITIAL_CONNECTION_FACTORY_NAME}" />
				<param name="ProviderURL" value="${JMS_WMQ_PROVIDER_URL}" />
				<param name="DestinationName" value="${JMS_WMQ_PERF_DESTINATION_NAME}" />
				<param name="ConnectionFactoryName" value="${JMS_WMQ_CONNECTION_FACTORY_NAME}" />
			</appender>
		</then>
		<else> -->
			<!-- logback jms appenders definition starts here -->
<!-- 			<appender name="Audit-Record-Queue" class="ajsc.JMSQueueAppender">
				<param name="InitialContextFactoryName"	value="com.tibco.tibjms.naming.TibjmsInitialContextFactory" />
				<param name="ProviderURL" value="${JMS_TIBCO_PROVIDER_URL}" />
				<param name="userName" value="${JMS_LOGGER_USER_NAME}" />
				<param name="password" value="${JMS_LOGGER_PASSWORD}" />
				<QueueBindingName>${JMS_LOGGER_AUDIT_QUEUE_BINDING}</QueueBindingName>
			</appender>
			<appender name="Performance-Tracker-Queue" class="ajsc.JMSQueueAppender">
				<param name="InitialContextFactoryName"	value="com.tibco.tibjms.naming.TibjmsInitialContextFactory" />
				<param name="ProviderURL" value="${JMS_TIBCO_PROVIDER_URL}" />
				<param name="userName" value="${JMS_LOGGER_USER_NAME}" />
				<param name="password" value="${JMS_LOGGER_PASSWORD}" />
				<QueueBindingName>${JMS_LOGGER_PERF_QUEUE_BINDING}</QueueBindingName>
			</appender>
		</else>
	</if> -->
	<appender name="ASYNC-audit" class="ch.qos.logback.classic.AsyncAppender">
		<queueSize>1000</queueSize>
		<discardingThreshold>0</discardingThreshold>
		<appender-ref ref="Audit-Record-Queue" />
	</appender>
	<logger name="AuditRecord" level="INFO" additivity="false">
		<appender-ref ref="ASYNC-audit" />
		<appender-ref ref="auditLogs" />
	</logger>
	<logger name="AuditRecord_DirectCall" level="INFO" additivity="false">
		<appender-ref ref="ASYNC-audit" />
		<appender-ref ref="auditLogs" />
	</logger>
	<appender name="ASYNC-perf" class="ch.qos.logback.classic.AsyncAppender">
		<queueSize>1000</queueSize>
		<discardingThreshold>0</discardingThreshold>
		<appender-ref ref="Performance-Tracker-Queue" />
	</appender>
	<logger name="PerfTrackerRecord" level="INFO" additivity="false">
		<appender-ref ref="ASYNC-perf" />
		<appender-ref ref="perfLogs" />
	</logger>
	<!-- logback jms appenders & loggers definition ends here -->
	
	<logger name="org.openecomp.aai.dmaap" level="DEBUG" additivity="false">
		<appender-ref ref="dmaapAAIWorkloadConsumer" />
		<appender-ref ref="dmaapAAIWorkloadConsumerdebug" />
		<appender-ref ref="dmaapAAIWorkloadConsumermetric" />
	</logger>
	
	<logger name="org.openecomp.aai" level="INFO" additivity="false">
		<appender-ref ref="asyncDEBUG" />
		<appender-ref ref="asyncERROR" />
		<appender-ref ref="asyncMETRIC" />
	</logger>
	<logger name="org.openecomp.aai.AUDITLOGGER" level="INFO" additivity="false">
			<appender-ref ref="asyncAUDIT" /> 
    </logger>
    
	<logger name="org.apache" level="WARN" />
	<logger name="org.zookeeper" level="WARN" />
	<logger name="com.thinkaurelius" level="WARN" />
	
	<!-- ============================================================================ -->
	<!-- General EELF logger -->
	<!-- ============================================================================ -->
	<logger name="com.att.eelf" level="WARN" additivity="false">
		<appender-ref ref="asyncDEBUG" />
		<appender-ref ref="asyncERROR" />
		<appender-ref ref="asyncMETRIC" />
		<appender-ref ref="asyncAUDIT" />
	</logger>
	
	<root level="WARN">
		<appender-ref ref="asyncDEBUG" />
		<appender-ref ref="asyncERROR" />
		<appender-ref ref="asyncMETRIC" />
		<appender-ref ref="asyncAUDIT" />
	</root>
</configuration>