Interface WebServerAccessLog

All Superinterfaces:
Descriptor, LogDescriptor, Serializable

public interface WebServerAccessLog extends LogDescriptor
Contains a sanitized web server access log file from a torproject.org web server.

Parsing non-sanitized web server access logs from torproject.org web servers or other web servers is not explicitly supported, but may work anyway.

Since:
2.2.0
  • Method Details

    • getLogDate

      LocalDate getLogDate()
      Returns the date when requests contained in the log have been started, which is parsed from the log file path.

      Typical web server access logs may contain date information in their file path, too, but that would be the date when the log file was rotated, which is not necessary the same date as the date in contained request lines.

      Since:
      2.2.0
    • getPhysicalHost

      String getPhysicalHost()
      Returns the hostname of the physical host writing this log file, which is parsed from the log file path.

      A physical host can serve multiple virtual hosts, and a virtual host can be served by multiple physical hosts.

      Since:
      2.2.0
    • getVirtualHost

      String getVirtualHost()
      Returns the hostname of the virtual host that this log file was written for, which is parsed from the log file path.

      A physical host can serve multiple virtual hosts, and a virtual host can be served by multiple physical hosts.

      Since:
      2.2.0
    • getUnrecognizedLines

      List<String> getUnrecognizedLines()
      Returns at most three unrecognized lines encountered while parsing the log.
      Specified by:
      getUnrecognizedLines in interface Descriptor
      Specified by:
      getUnrecognizedLines in interface LogDescriptor
      Since:
      2.2.0
    • logLines

      Returns a stream of all valid log lines.
      Specified by:
      logLines in interface LogDescriptor
      Throws:
      DescriptorParseException
      Since:
      2.3.0