pub struct LogFormat {
pub name: String,
pub regex: Regex,
pub field_names: Vec<String>,
pub display: Option<DisplayTemplate>,
pub record_start: Option<Regex>,
pub prompt: Option<ParsedPrompt>,
pub prompt_style: Option<Style>,
}Expand description
A named log format: a regex with named capture groups identifying the fields of one log line. Used by filtering to look up field values by name.
Fields§
§name: String§regex: Regex§field_names: Vec<String>Capture group names declared in the regex, in declaration order.
Used by --list-formats to show users what fields are available.
display: Option<DisplayTemplate>Optional default display template (display key in formats.toml).
When set and no CLI override is given, the viewer / batch output
renders each parsed line through this template instead of the raw line.
record_start: Option<Regex>§prompt: Option<ParsedPrompt>Optional default status-line prompt template (prompt key in formats.toml).
When set and no --prompt CLI flag is given, the viewport renders the
status line through this template instead of the built-in default.
prompt_style: Option<Style>Optional default style for the status row when this format’s prompt
is active. Per-format value; CLI --prompt-style overrides.