Interface LogDescriptor

All Superinterfaces:
Descriptor, Serializable
All Known Subinterfaces:
WebServerAccessLog

public interface LogDescriptor extends Descriptor
Contains a log file.

Unlike other descriptors, logs can get very large and are typically stored on disk in compressed form. Access to log contents through this interface and its subinterfaces is made available in compressed and decompressed form:

  • The raw descriptor bytes are compressed, because logs contain often redundant information that can achieve high compression rates. For example, a 500kB compressed log file might be deflated to 3GB.
  • The uncompressed log contents can be accessed as a stream of bytes.
  • A list of log lines (decompressed) can be retrieved.
Since:
2.2.0
  • Method Details

    • getRawDescriptorBytes

      byte[] getRawDescriptorBytes()
      Returns the raw compressed descriptor bytes of the log.

      For access to the log's decompressed bytes of use method decompressedByteStream.

      Specified by:
      getRawDescriptorBytes in interface Descriptor
      Since:
      2.2.0
    • decompressedByteStream

      InputStream decompressedByteStream() throws DescriptorParseException
      Returns the decompressed raw descriptor bytes of the log as stream.
      Throws:
      DescriptorParseException
      Since:
      2.2.0
    • getAnnotations

      List<String> getAnnotations()
      Returns annotations found in the log file, which may be an empty List if a log format does not support adding annotations.
      Specified by:
      getAnnotations in interface Descriptor
      Since:
      2.2.0
    • getUnrecognizedLines

      List<String> getUnrecognizedLines()
      Returns unrecognized lines encountered while parsing the log, which may be an empty list or a fixed-size list with only a few entries, depending on the log type.
      Specified by:
      getUnrecognizedLines in interface Descriptor
      Since:
      2.2.0
    • logLines

      Stream<? extends LogDescriptor.Line> logLines() throws DescriptorParseException
      Returns a stream of all parseable log lines.

      Depending on log size this might not fit into a collection type.

      Throws:
      DescriptorParseException
      Since:
      2.2.0