public class Log4jLogFormat extends AbstractRegexLogFormat
AbstractRegexLogFormat.RegexParser| Modifier and Type | Field and Description |
|---|---|
protected RecordTextSchema<?> |
schema |
formatPattern, logType| Constructor and Description |
|---|
Log4jLogFormat()
Create a log format for accessing log4j log data.
|
Log4jLogFormat(String formatPattern)
Create a log format for accessing log4j log data.
|
| Modifier and Type | Method and Description |
|---|---|
DataFormat.DataParser |
createParser(ParsingOptions options,
CharsetEncoding charEncoding,
String newline) |
List<String> |
getCustomLevelDefinitions()
Gets the custom level definitions.
|
RecordTextSchema<?> |
getSchema()
Gets the record schema of the source.
|
RecordTokenType |
getType()
Gets the record type associated with the format.
|
boolean |
isSplittable()
Indicates if the format supports parsing of subsections
of a file.
|
protected void |
refreshSchema()
Refresh and recalculate the schema.
|
void |
setCustomLevelDefinitions(List<String> customLevelDefinitions)
Sets the custom level definitions.
|
void |
setFormatPattern(String formatPattern)
Set the value used for the log format pattern
|
analyzeFormat, getFormatPattern, getLogType, setAnalysisprotected RecordTextSchema<?> schema
public Log4jLogFormat()
public Log4jLogFormat(String formatPattern)
formatPattern - the log4j pattern that determines the schemapublic void setCustomLevelDefinitions(List<String> customLevelDefinitions)
customLevelDefinitions - the custom level definition listpublic List<String> getCustomLevelDefinitions()
public void setFormatPattern(String formatPattern)
AbstractRegexLogFormatsetFormatPattern in interface LogFormatsetFormatPattern in class AbstractRegexLogFormatformatPattern - the value to use as the format patternpublic RecordTokenType getType()
LogFormatFor many formats, this may be derived from a schema object describing the format layout.
public RecordTextSchema<?> getSchema()
AbstractRegexLogFormatgetSchema in class AbstractRegexLogFormatprotected void refreshSchema()
AbstractRegexLogFormatrefreshSchema in class AbstractRegexLogFormatpublic boolean isSplittable()
LogFormat
A format should only return true if it can,
at least in some situations, support this sort of parsing.
If a format requires reading the entire file, it
must return false.
If a format is not splittable, a file in the format cannot be parsed in parallel; however, individual files can still be parsed independently in parallel, as when reading the contents of a directory or using a file globbing pattern.
isSplittable in interface LogFormatisSplittable in class AbstractRegexLogFormattrue if the format supports parsing
only a portion of the file, false otherwisepublic DataFormat.DataParser createParser(ParsingOptions options, CharsetEncoding charEncoding, String newline)
Copyright © 2021 Actian Corporation. All rights reserved.