First part of LTTng 2.0 support
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng.ui / src / org / eclipse / linuxtools / lttng / ui / views / control / service / LTTngControlService.java
1 /**********************************************************************
2 * Copyright (c) 2012 Ericsson
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * Bernd Hufmann - Initial API and implementation
11 **********************************************************************/
12 package org.eclipse.linuxtools.lttng.ui.views.control.service;
13
14 import java.util.ArrayList;
15 import java.util.List;
16 import java.util.regex.Matcher;
17 import java.util.regex.Pattern;
18 import java.util.regex.PatternSyntaxException;
19
20 import org.eclipse.core.commands.ExecutionException;
21 import org.eclipse.core.runtime.IProgressMonitor;
22 import org.eclipse.core.runtime.NullProgressMonitor;
23 import org.eclipse.linuxtools.lttng.ui.views.control.Messages;
24 import org.eclipse.linuxtools.lttng.ui.views.control.model.IBaseEventInfo;
25 import org.eclipse.linuxtools.lttng.ui.views.control.model.IChannelInfo;
26 import org.eclipse.linuxtools.lttng.ui.views.control.model.IDomainInfo;
27 import org.eclipse.linuxtools.lttng.ui.views.control.model.IEventInfo;
28 import org.eclipse.linuxtools.lttng.ui.views.control.model.ISessionInfo;
29 import org.eclipse.linuxtools.lttng.ui.views.control.model.IUstProviderInfo;
30 import org.eclipse.linuxtools.lttng.ui.views.control.model.impl.BaseEventInfo;
31 import org.eclipse.linuxtools.lttng.ui.views.control.model.impl.ChannelInfo;
32 import org.eclipse.linuxtools.lttng.ui.views.control.model.impl.DomainInfo;
33 import org.eclipse.linuxtools.lttng.ui.views.control.model.impl.EventInfo;
34 import org.eclipse.linuxtools.lttng.ui.views.control.model.impl.SessionInfo;
35 import org.eclipse.linuxtools.lttng.ui.views.control.model.impl.UstProviderInfo;
36 /**
37 * <b><u>LTTngControlService</u></b>
38 * <p>
39 * Service for sending LTTng trace control commands to remote host.
40 * </p>
41 */
42 public class LTTngControlService implements ILttngControlService {
43 // ------------------------------------------------------------------------
44 // Constants
45 // ------------------------------------------------------------------------
46 // Command constants
47 /**
48 * The lttng tools command.
49 */
50 private final static String CONTROL_COMMAND = "lttng"; //$NON-NLS-1$
51 /**
52 * Command: lttng list.
53 */
54 private final static String COMMAND_LIST = CONTROL_COMMAND + " list "; //$NON-NLS-1$
55 /**
56 * Command to list kernel tracer information.
57 */
58 private final static String COMMAND_LIST_KERNEL = COMMAND_LIST + "-k"; //$NON-NLS-1$
59 /**
60 * Command to list user space trace information.
61 */
62 private final static String COMMAND_LIST_UST = COMMAND_LIST + "-u"; //$NON-NLS-1$
63
64 // Parsing constants
65 /**
66 * Pattern to match for error output
67 */
68 private final static String ERROR_PATTERN = "\\s*Error\\:.*"; //$NON-NLS-1$
69 /**
70 * Pattern to match for session information (lttng list)
71 */
72 private final static String SESSION_PATTERN = "\\s+(\\d+)\\)\\s+(.*)\\s+\\((.*)\\)\\s+\\[(active|inactive)\\].*"; //$NON-NLS-1$
73 /**
74 * Pattern to match for session information (lttng list <session>)
75 */
76 private final static String TRACE_SESSION_PATTERN = "\\s*Tracing\\s+session\\s+(.*)\\:\\s+\\[(active|inactive)\\].*"; //$NON-NLS-1$
77 /**
78 * Pattern to match for session path information (lttng list <session>)
79 */
80 private final static String TRACE_SESSION_PATH_PATTERN = "\\s*Trace\\s+path\\:\\s+(.*)"; //$NON-NLS-1$
81 /**
82 * Pattern to match for kernel domain information (lttng list <session>)
83 */
84 private final static String DOMAIN_KERNEL_PATTERN = "=== Domain: Kernel ==="; //$NON-NLS-1$
85 /**
86 * Pattern to match for ust domain information (lttng list <session>)
87 */
88 private final static String DOMAIN_UST_GLOBAL_PATTERN = "=== Domain: UST global ==="; //$NON-NLS-1$
89 /**
90 * Pattern to match for channels section (lttng list <session>)
91 */
92 private final static String CHANNELS_SECTION_PATTERN = "\\s*Channels\\:"; //$NON-NLS-1$
93 /**
94 * Pattern to match for channel information (lttng list <session>)
95 */
96 private final static String CHANNEL_PATTERN = "\\s*-\\s+(.*)\\:\\s+\\[(enabled|disabled)\\]"; //$NON-NLS-1$
97 /**
98 * Pattern to match for events section information (lttng list <session>)
99 */
100 private final static String EVENT_SECTION_PATTERN = "\\s*Events\\:"; //$NON-NLS-1$
101 /**
102 * Pattern to match for event information (no enabled events) (lttng list <session>)
103 */
104 // private final static String EVENT_NONE_PATTERN = "\\s+None"; //$NON-NLS-1$
105 /**
106 * Pattern to match for event information (lttng list <session>)
107 */
108 private final static String EVENT_PATTERN = "\\s+(.*)\\s+\\(loglevel:\\s+(.*)\\)\\s+\\(type:\\s+(.*)\\)\\s+\\[(enabled|disabled)\\].*"; //$NON-NLS-1$
109 /**
110 * Pattern to match for channel (overwite mode) information (lttng list <session>)
111 */
112 private final static String OVERWRITE_MODE_ATTRIBUTE = "\\s+overwrite\\s+mode\\:.*"; //$NON-NLS-1$
113 /**
114 * Pattern to match indicating false for overwrite mode
115 */
116 private final static String OVERWRITE_MODE_ATTRIBUTE_FALSE = "0"; //$NON-NLS-1$
117 /**
118 * Pattern to match for channel (sub-buffer size) information (lttng list <session>)
119 */
120 private final static String SUBBUFFER_SIZE_ATTRIBUTE = "\\s+subbufers\\s+size\\:.*"; //$NON-NLS-1$
121 /**
122 * Pattern to match for channel (number of sub-buffers) information (lttng list <session>)
123 */
124 private final static String NUM_SUBBUFFERS_ATTRIBUTE = "\\s+number\\s+of\\s+subbufers\\:.*"; //$NON-NLS-1$
125 /**
126 * Pattern to match for channel (switch timer) information (lttng list <session>)
127 */
128 private final static String SWITCH_TIMER_ATTRIBUTE = "\\s+switch\\s+timer\\s+interval\\:.*"; //$NON-NLS-1$
129 /**
130 * Pattern to match for channel (read timer) information (lttng list <session>)
131 */
132 private final static String READ_TIMER_ATTRIBUTE = "\\s+read\\s+timer\\s+interval\\:.*"; //$NON-NLS-1$
133 /**
134 * Pattern to match for channel (output type) information (lttng list <session>)
135 */
136 private final static String OUTPUT_ATTRIBUTE = "\\s+output\\:.*"; //$NON-NLS-1$
137 /**
138 * Pattern to match for provider information (lttng list -k/-u)
139 */
140 private final static String PROVIDER_EVENT_PATTERN = "\\s*(.*)\\s+\\(loglevel:\\s+(.*)\\)\\s+\\(type:\\s+(.*)\\)"; //$NON-NLS-1$
141 /**
142 * Pattern to match for UST provider information (lttng list -u)
143 */
144 private final static String UST_PROVIDER_PATTERN = "\\s*PID\\:\\s+(\\d+)\\s+-\\s+Name\\:\\s+(.*)"; //$NON-NLS-1$
145
146 // ------------------------------------------------------------------------
147 // Attributes
148 // ------------------------------------------------------------------------
149 /**
150 * The command shell implementation
151 */
152 private ICommandShell fCommandShell = null;
153
154 // ------------------------------------------------------------------------
155 // Constructors
156 // ------------------------------------------------------------------------
157
158 /**
159 * Constructor
160 * @param shell - the command shell implementation to use
161 */
162 public LTTngControlService(ICommandShell shell) {
163 fCommandShell = shell;
164 }
165 // ------------------------------------------------------------------------
166 // Operations
167 // ------------------------------------------------------------------------
168
169 /*
170 * (non-Javadoc)
171 * @see org.eclipse.linuxtools.lttng.ui.views.control.service.ILttngControlService#getSessionNames()
172 */
173 @Override
174 public String[] getSessionNames() throws ExecutionException {
175 return getSessionNames(new NullProgressMonitor());
176 }
177
178 /*
179 * (non-Javadoc)
180 * @see org.eclipse.linuxtools.lttng.ui.views.control.service.ILttngControlService#getSessionNames(org.eclipse.core.runtime.IProgressMonitor)
181 */
182 @Override
183 public String[] getSessionNames(IProgressMonitor monitor) throws ExecutionException {
184
185 String command = COMMAND_LIST;
186 ICommandResult result = fCommandShell.executeCommand(command, monitor);
187
188 if (isError(result)) {
189 // TODO: no session available shouldn't be an error!
190 if (result.getOutput().length > 0 && result.getOutput()[0].matches(ERROR_PATTERN)) {
191 // no sessions available
192 return new String[0];
193 }
194 throw new ExecutionException(Messages.TraceControl_CommandError + " " + command + "\n" + formatOutput(result.getOutput())); //$NON-NLS-1$ //$NON-NLS-2$
195 }
196
197 // Output:
198 // Available tracing sessions:
199 // 1) mysession1 (/home/user/lttng-traces/mysession1-20120123-083928) [inactive]
200 // 2) mysession (/home/user/lttng-traces/mysession-20120123-083318) [inactive]
201 //
202 // Use lttng list <session_name> for more details
203
204 ArrayList<String> retArray = new ArrayList<String>();
205 int index = 0;
206 while (index < result.getOutput().length) {
207 String line = result.getOutput()[index];
208 try {
209 Pattern pattern = Pattern.compile(SESSION_PATTERN);
210 Matcher matcher = pattern.matcher(line);
211 if (matcher.matches()) {
212 retArray.add(matcher.group(2).trim());
213 }
214 } catch (PatternSyntaxException e) {
215 }
216 index++;
217 }
218 return retArray.toArray(new String[retArray.size()]);
219 }
220
221 /*
222 * (non-Javadoc)
223 * @see org.eclipse.linuxtools.lttng.ui.views.control.service.ILttngControlService#getSession(java.lang.String)
224 */
225 @Override
226 public ISessionInfo getSession(String sessionName) throws ExecutionException {
227 return getSession(sessionName, new NullProgressMonitor());
228 }
229
230 /*
231 * (non-Javadoc)
232 * @see org.eclipse.linuxtools.lttng.ui.views.control.service.ILttngControlService#getSession(java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
233 */
234 @Override
235 public ISessionInfo getSession(String sessionName, IProgressMonitor monitor) throws ExecutionException {
236 String command = COMMAND_LIST + sessionName;
237 ICommandResult result = fCommandShell.executeCommand(command, monitor);
238
239 if (isError(result)) {
240 throw new ExecutionException(Messages.TraceControl_CommandError + " " + command + "\n" + formatOutput(result.getOutput())); //$NON-NLS-1$ //$NON-NLS-2$
241 }
242
243 int index = 0;
244
245 // Output:
246 // Tracing session mysession2: [inactive]
247 // Trace path: /home/eedbhu/lttng-traces/mysession2-20120123-110330
248 ISessionInfo sessionInfo = new SessionInfo(sessionName);
249
250 try {
251 while (index < result.getOutput().length) {
252 // Tracing session mysession2: [inactive]
253 // Trace path: /home/eedbhu/lttng-traces/mysession2-20120123-110330
254 //
255 // === Domain: Kernel ===
256 //
257 String line = result.getOutput()[index];
258 if (line.matches(TRACE_SESSION_PATTERN)) {
259 Pattern pattern = Pattern.compile(TRACE_SESSION_PATTERN);
260 Matcher matcher = pattern.matcher(line);
261 if (matcher.matches()) {
262 sessionInfo.setSessionState(matcher.group(2));
263 }
264 index++;
265 } else if (line.matches(TRACE_SESSION_PATH_PATTERN)) {
266 Pattern pattern = Pattern.compile(TRACE_SESSION_PATH_PATTERN);
267 Matcher matcher = pattern.matcher(line);
268 if (matcher.matches()) {
269 sessionInfo.setSessionPath(matcher.group(1).trim());
270 }
271 index++;
272 }
273 else if (line.matches(DOMAIN_KERNEL_PATTERN)) {
274 // Create Domain
275 IDomainInfo domainInfo = new DomainInfo(Messages.TraceControl_KernelDomainDisplayName);
276 sessionInfo.addDomain(domainInfo);
277
278 // in domain kernel
279 ArrayList<IChannelInfo> channels = new ArrayList<IChannelInfo>();
280 index = parseDomain(result.getOutput(), index, channels);
281
282 // set channels
283 domainInfo.setChannels(channels);
284
285 } else if (line.contains(DOMAIN_UST_GLOBAL_PATTERN)) {
286 IDomainInfo domainInfo = new DomainInfo(Messages.TraceControl_UstGlobalDomainDisplayName);
287 sessionInfo.addDomain(domainInfo);
288
289 // in domain kernel
290 ArrayList<IChannelInfo> channels = new ArrayList<IChannelInfo>();
291 index = parseDomain(result.getOutput(), index, channels);
292
293 // set channels
294 domainInfo.setChannels(channels);
295 } else {
296 index++;
297 }
298 }
299 } catch (PatternSyntaxException e) {
300 throw new ExecutionException("Invalid regular expression", e); //$NON-NLS-1$
301 }
302 return sessionInfo;
303 }
304
305 /*
306 * (non-Javadoc)
307 * @see org.eclipse.linuxtools.lttng.ui.views.control.service.ILttngControlService#getKernelProvider()
308 */
309 @Override
310 public List<IBaseEventInfo> getKernelProvider() throws ExecutionException {
311 return getKernelProvider(new NullProgressMonitor());
312 }
313
314 /*
315 * (non-Javadoc)
316 * @see org.eclipse.linuxtools.lttng.ui.views.control.service.ILttngControlService#getKernelProvider(org.eclipse.core.runtime.IProgressMonitor)
317 */
318 @Override
319 public List<IBaseEventInfo> getKernelProvider(IProgressMonitor monitor) throws ExecutionException {
320 String command = COMMAND_LIST_KERNEL;
321 ICommandResult result = fCommandShell.executeCommand(command, monitor);
322 if (isError(result)) {
323 throw new ExecutionException(Messages.TraceControl_CommandError + " " + command + "\n" + formatOutput(result.getOutput())); //$NON-NLS-1$ //$NON-NLS-2$
324 }
325
326 // Kernel events:
327 // -------------
328 // sched_kthread_stop (type: tracepoint)
329 List<IBaseEventInfo> events = new ArrayList<IBaseEventInfo>();
330 getProviderEventInfo(result.getOutput(), 0, events);
331 return events;
332 }
333
334 /*
335 * (non-Javadoc)
336 * @see org.eclipse.linuxtools.lttng.ui.views.control.service.ILttngControlService#getUstProvider()
337 */
338 @Override
339 public List<IUstProviderInfo> getUstProvider() throws ExecutionException {
340 return getUstProvider(new NullProgressMonitor());
341 }
342
343 /*
344 * (non-Javadoc)
345 * @see org.eclipse.linuxtools.lttng.ui.views.control.service.ILttngControlService#getUstProvider(org.eclipse.core.runtime.IProgressMonitor)
346 */
347 @Override
348 public List<IUstProviderInfo> getUstProvider(IProgressMonitor monitor) throws ExecutionException {
349 String command = COMMAND_LIST_UST;
350 ICommandResult result = fCommandShell.executeCommand(command, monitor);
351
352 if (isError(result)) {
353 throw new ExecutionException(Messages.TraceControl_CommandError + " " + command + "\n" + formatOutput(result.getOutput())); //$NON-NLS-1$ //$NON-NLS-2$
354 }
355
356 // UST events:
357 // -------------
358 //
359 // PID: 3635 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
360 // ust_tests_hello:tptest_sighandler (loglevel: TRACE_EMERG0) (type: tracepoint)
361 // ust_tests_hello:tptest (loglevel: TRACE_EMERG0) (type: tracepoint)
362 //
363 // PID: 6459 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
364 // ust_tests_hello:tptest_sighandler (loglevel: TRACE_EMERG0) (type: tracepoint)
365 // ust_tests_hello:tptest (loglevel: TRACE_EMERG0) (type: tracepoint)
366
367 List<IUstProviderInfo> allProviders = new ArrayList<IUstProviderInfo>();
368 IUstProviderInfo provider = null;
369
370 int index = 0;
371 while (index < result.getOutput().length) {
372 String line = result.getOutput()[index];
373 if (line.matches(UST_PROVIDER_PATTERN)) {
374 Pattern pattern = Pattern.compile(UST_PROVIDER_PATTERN);
375
376 Matcher matcher = pattern.matcher(line);
377
378 if (matcher.matches()) {
379
380 provider = new UstProviderInfo(matcher.group(2).trim());
381 provider.setPid(Integer.valueOf(matcher.group(1).trim()));
382 List<IBaseEventInfo> events = new ArrayList<IBaseEventInfo>();
383 index = getProviderEventInfo(result.getOutput(), ++index, events);
384 provider.setEvents(events);
385 allProviders.add(provider);
386 }
387
388 } else {
389 index++;
390 }
391
392 }
393 return allProviders;
394 }
395
396 // ------------------------------------------------------------------------
397 // Helper methods
398 // ------------------------------------------------------------------------
399 /**
400 * Checks if command result is an error result.
401 * @param result - the command result to check
402 * @return true if error else false
403 */
404 private boolean isError(ICommandResult result) {
405 if ((result.getResult()) != 0 || (result.getOutput().length < 1 || result.getOutput()[0].matches(ERROR_PATTERN))) {
406 return true;
407 }
408 return false;
409 }
410
411 /**
412 * Formats the output string as single string.
413 * @param output - output array
414 * @return - the formatted output
415 */
416 private String formatOutput(String[] output) {
417 if (output == null || output.length == 0) {
418 return ""; //$NON-NLS-1$
419 }
420
421 StringBuffer ret = new StringBuffer();
422 for (int i = 0; i < output.length; i++) {
423 ret.append(output[i] + "\n"); //$NON-NLS-1$
424 }
425 return ret.toString();
426 }
427
428 /**
429 * Parses the domain information.
430 *
431 * @param output - a command output array
432 * @param currentIndex - current index in command output array
433 * @param channels - list for returning channel information
434 * @return the new current index in command output array
435 * @throws PatternSyntaxException
436 */
437 private int parseDomain(String[] output, int currentIndex, List<IChannelInfo> channels) throws PatternSyntaxException {
438 int index = currentIndex;
439
440 // Channels:
441 // -------------
442 // - channnel1: [enabled]
443 //
444 // Attributes:
445 // overwrite mode: 0
446 // subbufers size: 262144
447 // number of subbufers: 4
448 // switch timer interval: 0
449 // read timer interval: 200
450 // output: splice()
451
452 while (index < output.length) {
453 String line = output[index];
454 if (line.matches(CHANNELS_SECTION_PATTERN)) {
455 IChannelInfo channelInfo = null;
456 while (index < output.length) {
457 String subLine = output[index];
458 if (subLine.matches(CHANNEL_PATTERN)) {
459
460 Pattern pattern = Pattern.compile(CHANNEL_PATTERN);
461 Matcher matcher = pattern.matcher(subLine);
462 channelInfo = new ChannelInfo(""); //$NON-NLS-1$
463 if (matcher.matches()) {
464 // get channel name
465 channelInfo.setName(matcher.group(1));
466
467 // get channel enablement
468 channelInfo.setState(matcher.group(2));
469
470 // add channel
471 channels.add(channelInfo);
472 }
473 } else if (subLine.matches(OVERWRITE_MODE_ATTRIBUTE)) {
474 String value = getAttributeValue(subLine);
475 channelInfo.setOverwriteMode(!OVERWRITE_MODE_ATTRIBUTE_FALSE.equals(value));
476 } else if (subLine.matches(SUBBUFFER_SIZE_ATTRIBUTE)) {
477 channelInfo.setSubBufferSize(Long.valueOf(getAttributeValue(subLine)));
478
479 } else if (subLine.matches(NUM_SUBBUFFERS_ATTRIBUTE)) {
480 channelInfo.setNumberOfSubBuffers(Integer.valueOf(getAttributeValue(subLine)));
481
482 } else if (subLine.matches(SWITCH_TIMER_ATTRIBUTE)) {
483 channelInfo.setSwitchTimer(Long.valueOf(getAttributeValue(subLine)));
484
485 } else if (subLine.matches(READ_TIMER_ATTRIBUTE)) {
486 channelInfo.setReadTimer(Long.valueOf(getAttributeValue(subLine)));
487
488 } else if (subLine.matches(OUTPUT_ATTRIBUTE)) {
489 channelInfo.setOutputType(getAttributeValue(subLine));
490
491 } else if (subLine.matches(EVENT_SECTION_PATTERN)) {
492 List<IEventInfo> events = new ArrayList<IEventInfo>();
493 index = parseEvents(output, index, events);
494 channelInfo.setEvents(events);
495 // we want to stay at the current index to be able to exit the domain
496 continue;
497 }
498 else if (subLine.matches(DOMAIN_KERNEL_PATTERN)) {
499 return index;
500
501 } else if (subLine.contains(DOMAIN_UST_GLOBAL_PATTERN)) {
502 return index;
503 }
504 index++;
505 }
506 }
507 index++;
508 }
509 return index;
510 }
511
512 /**
513 * Parses the event information within a domain.
514 *
515 * @param output - a command output array
516 * @param currentIndex - current index in command output array
517 * @param events - list for returning event information
518 * @return the new current index in command output array
519 * @throws PatternSyntaxException
520 */
521 private int parseEvents(String[] output, int currentIndex, List<IEventInfo> events) throws PatternSyntaxException {
522 int index = currentIndex;
523
524 while (index < output.length) {
525 String line = output[index];
526 if (line.matches(CHANNEL_PATTERN)) {
527 // end of channel
528 return index;
529 } else if (line.matches(DOMAIN_KERNEL_PATTERN)) {
530 // end of domain
531 return index;
532 } else if (line.contains(DOMAIN_UST_GLOBAL_PATTERN)) {
533 // end of domain
534 return index;
535 } else if (line.matches(EVENT_PATTERN)) {
536 Pattern pattern = Pattern.compile(EVENT_PATTERN);
537
538 Matcher matcher = pattern.matcher(line);
539
540 if (matcher.matches()) {
541 IEventInfo eventInfo = new EventInfo(matcher.group(1).trim());
542 eventInfo.setLogLevel(matcher.group(2).trim());
543 eventInfo.setEventType(matcher.group(3).trim());
544 eventInfo.setState(matcher.group(4));
545 events.add(eventInfo);
546 }
547 }
548 // else if (line.matches(EVENT_NONE_PATTERN)) {
549 // do nothing
550 // } else
551 index++;
552 }
553
554 return index;
555 }
556
557 /**
558 * Parses a line with attributes: <attribute Name>: <attribute value>
559 *
560 * @param line - attribute line to parse
561 * @return the attribute value as string
562 * @throws PatternSyntaxException
563 */
564 private String getAttributeValue(String line) {
565 String[] temp = line.split("\\: "); //$NON-NLS-1$
566 return temp[1];
567 }
568
569 /**
570 * Parses the event information within a provider.
571 *
572 * @param output - a command output array
573 * @param currentIndex - current index in command output array
574 * @param events - list for returning event information
575 * @return the new current index in command output array
576 */
577 private int getProviderEventInfo(String[] output, int currentIndex, List<IBaseEventInfo> events) {
578 int index = currentIndex;
579 while (index < output.length) {
580 String line = output[index];
581 if (line.matches(PROVIDER_EVENT_PATTERN)) {
582 // sched_kthread_stop (loglevel: TRACE_EMERG0) (type: tracepoint)
583 Pattern pattern = Pattern.compile(PROVIDER_EVENT_PATTERN);
584
585 Matcher matcher = pattern.matcher(line);
586
587 if (matcher.matches()) {
588 IBaseEventInfo eventInfo = new BaseEventInfo(matcher.group(1).trim());
589 eventInfo.setLogLevel(matcher.group(2).trim());
590 eventInfo.setEventType(matcher.group(3).trim());
591 events.add(eventInfo);
592 }
593 } else if (line.matches(UST_PROVIDER_PATTERN)) {
594 return index;
595 }
596 index++;
597 }
598 return index;
599 }
600
601 }
This page took 0.043668 seconds and 6 git commands to generate.