LogLineParser class

Parses log lines against a compiled format template.

Constructors

LogLineParser(String template)
Compiles template (with {field} / {field:pattern} placeholders). Audited: 2026-06-12 11:26 EDT
factory
LogLineParser.apacheCombined()
Apache combined log format (common + "referer" "user-agent"). Audited: 2026-06-12 11:26 EDT
factory
LogLineParser.apacheCommon()
Apache/NCSA common log format: host ident user time "request" status size. Audited: 2026-06-12 11:26 EDT
factory
LogLineParser.nginxCombined()
nginx default combined access log (same shape as Apache combined). Audited: 2026-06-12 11:26 EDT
factory

Properties

fields List<String>
The field names this parser extracts, in template order. Audited: 2026-06-12 11:26 EDT
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse(String line) Map<String, String>?
Parses line into field → value, or null if the line doesn't match the template. Missing optional captures come back as empty strings. Audited: 2026-06-12 11:26 EDT
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited