Package org.torproject.descriptor
Interface WebServerAccessLog
- All Superinterfaces:
Descriptor
,LogDescriptor
,Serializable
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
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Facilitates access to all log line fields that don't only contain default values post sanitization. -
Method Summary
Modifier and TypeMethodDescriptionReturns the date when requests contained in the log have been started, which is parsed from the log file path.Returns the hostname of the physical host writing this log file, which is parsed from the log file path.Returns at most three unrecognized lines encountered while parsing the log.Returns the hostname of the virtual host that this log file was written for, which is parsed from the log file path.logLines()
Returns a stream of all valid log lines.Methods inherited from interface org.torproject.descriptor.Descriptor
getDescriptorFile, getRawDescriptorLength
Methods inherited from interface org.torproject.descriptor.LogDescriptor
decompressedByteStream, getAnnotations, getRawDescriptorBytes
-
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
Returns at most three unrecognized lines encountered while parsing the log.- Specified by:
getUnrecognizedLines
in interfaceDescriptor
- Specified by:
getUnrecognizedLines
in interfaceLogDescriptor
- Since:
- 2.2.0
-
logLines
Returns a stream of all valid log lines.- Specified by:
logLines
in interfaceLogDescriptor
- Throws:
DescriptorParseException
- Since:
- 2.3.0
-