-
- All Known Implementing Classes:
AbstractRegexLogFormat,CLFLogFormat,CombinedLogFormat,ELFLogFormat,GenericLogFormat,GlassfishLogFormat,Log4jLogFormat,SyslogLogFormat
public interface LogFormat
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FormatAnalyzer.FormatAnalysisanalyzeFormat(Reader input)Creates the analysis object based on the provided input.DataFormat.DataParsercreateParser(ParsingOptions options, CharsetEncoding charEncoding, String newline)StringgetFormatPattern()Get the value used for the log format patternSupportedLogTypegetLogType()Get the SupportedLogType of this format.RecordTokenTypegetType()Gets the record type associated with the format.booleanisSplittable()Indicates if the format supports parsing of subsections of a file.LogFormatsetAnalysis(FormatAnalyzer.FormatAnalysis analysis)Sets the analysis object to use to determine meta-data.voidsetFormatPattern(String formatPattern)Set the value used for the log format pattern
-
-
-
Method Detail
-
getLogType
SupportedLogType getLogType()
Get the SupportedLogType of this format.- Returns:
- the SupportedLogType this format implements
-
getType
RecordTokenType getType()
Gets the record type associated with the format. Records produced by the associated parser or consumed by the associated formatter will be of this type.For many formats, this may be derived from a schema object describing the format layout.
- Returns:
- the format's record type
-
getFormatPattern
String getFormatPattern()
Get the value used for the log format pattern- Returns:
- the text value of the format pattern
-
setFormatPattern
void setFormatPattern(String formatPattern)
Set the value used for the log format pattern- Parameters:
formatPattern- the value to use as the format pattern
-
isSplittable
boolean isSplittable()
Indicates if the format supports parsing of subsections of a file.A format should only return
trueif it can, at least in some situations, support this sort of parsing. If a format requires reading the entire file, it must returnfalse.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.
- Returns:
trueif the format supports parsing only a portion of the file,falseotherwise
-
analyzeFormat
FormatAnalyzer.FormatAnalysis analyzeFormat(Reader input) throws IOException, ParseException
Creates the analysis object based on the provided input.- Parameters:
input- the input source to analyze- Returns:
- the analysis object
- Throws:
ParseExceptionIOException
-
setAnalysis
LogFormat setAnalysis(FormatAnalyzer.FormatAnalysis analysis)
Sets the analysis object to use to determine meta-data.- Parameters:
analysis- the analysis object
-
createParser
DataFormat.DataParser createParser(ParsingOptions options, CharsetEncoding charEncoding, String newline)
-
-