Class GrokDataFormat
java.lang.Object
org.apache.camel.model.IdentifiedType
org.apache.camel.model.DataFormatDefinition
org.apache.camel.model.dataformat.GrokDataFormat
@Metadata(label="dataformat,transformation",
title="Grok",
firstVersion="3.0.0")
public class GrokDataFormat
extends DataFormatDefinition
Unmarshal unstructured data to objects using Logstash based Grok patterns.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetAllowMultipleMatchesPerLine(String allowMultipleMatchesPerLine) If false, every line of input is matched for pattern only once.voidsetFlattened(String flattened) Turns on flattened mode.voidsetNamedOnly(String namedOnly) Whether to capture named expressions only or not (i.e.voidsetPattern(String pattern) The grok pattern to match lines of inputtoString()Methods inherited from class org.apache.camel.model.DataFormatDefinition
getDataFormat, getDataFormatName, getShortName, setDataFormat, setDataFormatNameMethods inherited from class org.apache.camel.model.IdentifiedType
getId, setId
-
Constructor Details
-
GrokDataFormat
public GrokDataFormat()
-
-
Method Details
-
getPattern
-
setPattern
The grok pattern to match lines of input -
getFlattened
-
setFlattened
Turns on flattened mode. In flattened mode the exception is thrown when there are multiple pattern matches with same key. -
getAllowMultipleMatchesPerLine
-
setAllowMultipleMatchesPerLine
If false, every line of input is matched for pattern only once. Otherwise the line can be scanned multiple times when non-terminal pattern is used. -
getNamedOnly
-
setNamedOnly
Whether to capture named expressions only or not (i.e. %{IP:ip} but not ${IP}) -
toString
-