-
- 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.FormatAnalysis
analyzeFormat(Reader input)
Creates the analysis object based on the provided input.DataFormat.DataParser
createParser(ParsingOptions options, CharsetEncoding charEncoding, String newline)
String
getFormatPattern()
Get the value used for the log format patternSupportedLogType
getLogType()
Get the SupportedLogType of this format.RecordTokenType
getType()
Gets the record type associated with the format.boolean
isSplittable()
Indicates if the format supports parsing of subsections of a file.LogFormat
setAnalysis(FormatAnalyzer.FormatAnalysis analysis)
Sets the analysis object to use to determine meta-data.void
setFormatPattern(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
true
if 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:
true
if the format supports parsing only a portion of the file,false
otherwise
-
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:
ParseException
IOException
-
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)
-
-