Class SyslogLogFormat

java.lang.Object
com.pervasive.datarush.operators.io.textfile.AbstractRegexLogFormat
com.pervasive.datarush.operators.io.textfile.SyslogLogFormat
All Implemented Interfaces:
LogFormat

public class SyslogLogFormat extends AbstractRegexLogFormat
Describes the format of a syslog log file. Currently only supports BSD syslog files conforming to RFC-3164. The format pattern specifies the year and timezone that should be used when parsing the log dates.
  • Field Details

  • Constructor Details

    • SyslogLogFormat

      public SyslogLogFormat()
      Create a log format for accessing syslog log data.
    • SyslogLogFormat

      public SyslogLogFormat(String formatPattern)
      Create a log format for accessing syslog log data.
      Parameters:
      formatPattern - the year and optionally timezone to use
  • Method Details

    • getType

      public RecordTokenType getType()
      Description copied from interface: LogFormat
      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
    • getSchema

      public RecordTextSchema<?> getSchema()
      Description copied from class: AbstractRegexLogFormat
      Gets the record schema of the source.
      Specified by:
      getSchema in class AbstractRegexLogFormat
      Returns:
      the record schema of the source
    • refreshSchema

      protected void refreshSchema()
      Description copied from class: AbstractRegexLogFormat
      Refresh and recalculate the schema. This is usually done after changing a setting.
      Specified by:
      refreshSchema in class AbstractRegexLogFormat
    • isSplittable

      public boolean isSplittable()
      Description copied from interface: LogFormat
      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 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.

      Specified by:
      isSplittable in interface LogFormat
      Overrides:
      isSplittable in class AbstractRegexLogFormat
      Returns:
      true if the format supports parsing only a portion of the file, false otherwise
    • createParser

      public DataFormat.DataParser createParser(ParsingOptions options, CharsetEncoding charEncoding, String newline)