public class Match
extends java.lang.Object
Match is a representation in Grok world of your log.| Modifier and Type | Field and Description |
|---|---|
static Match |
EMPTY
Create Empty grok matcher.
|
| Constructor and Description |
|---|
Match(java.lang.CharSequence subject,
Grok grok,
java.util.regex.Matcher match,
int start,
int end)
Create a new
Match object. |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.lang.Object> |
capture()
Match to the subject the regex and save the matched element into a map.
|
java.util.Map<java.lang.String,java.lang.Object> |
captureFlattened()
Match to the subject the regex and save the matched element into a map
Multiple values to the same key are flattened to one value: the sole non-null value will be captured.
|
int |
getEnd() |
java.util.regex.Matcher |
getMatch() |
int |
getStart() |
java.lang.CharSequence |
getSubject()
Retrurn the single line of log.
|
boolean |
isKeepEmptyCaptures() |
java.lang.Boolean |
isNull()
Util fct.
|
void |
setKeepEmptyCaptures(boolean ignore)
Ignore empty captures.
|
public static final Match EMPTY
public Match(java.lang.CharSequence subject,
Grok grok,
java.util.regex.Matcher match,
int start,
int end)
Match object.public java.util.regex.Matcher getMatch()
public int getStart()
public int getEnd()
public void setKeepEmptyCaptures(boolean ignore)
public boolean isKeepEmptyCaptures()
public java.lang.CharSequence getSubject()
public java.util.Map<java.lang.String,java.lang.Object> capture()
public java.util.Map<java.lang.String,java.lang.Object> captureFlattened()
throws GrokException
capture which returns multiple values of the same key as list.GrokException - if a keys has multiple non-null values.public java.lang.Boolean isNull()