Constructor
new LogParser(rawString, delimiter, regexp)
Constructs a LogParser to parse the provided raw log text.
Parameters:
Name | Type | Description |
---|---|---|
rawString |
String | the raw log text |
delimiter |
NamedRegExp | a regex that specifies the delimiter. Anything that matches the regex will be treated as a delimiter. A delimiter acts to separate different executions. |
regexp |
NamedRegExp | A regex that specifies the log parser. The parser must contain the named capture groups "clock", "event", and "host" representing the vector clock, the event string, and the host respectively. |
- Source:
Methods
getLabels() → {Array.<String>}
Gets all of the labels of the executions. The ordering of labels in the
returned array is guarenteed to be the same as the order in which they are
encountered in the raw log text
- Source:
Returns:
An array of all the labels.
- Type
- Array.<String>
getLogEvents(label) → {Array.<LogEvent>}
Returns the LogEvents parsed by this. The ordering of LogEvents in
the returned array is guaranteed to be the same as the order in which they
were encountered in the raw log text
Parameters:
Name | Type | Description |
---|---|---|
label |
String | The label of the execution you want to get log events from. |
- Source:
Returns:
An array of LogEvents
- Type
- Array.<LogEvent>