Skip to main content

Crate jlf_core

Crate jlf_core 

Source

Modules§

colors

Structs§

Column
A column: a display name plus the parsed accessor used to pull its value.
Config
ConfigFile
Digest
A streaming numeric summary with bounded memory.
Filter
A single key OP value[,value...] predicate over a parsed record.
FormatDef
A custom output format: one $-DSL body template (a $rows( … ) marks the per-record part; text around it prints once), with interpolated values escaped per escape.
FormattedLog
Formatter
MarkupStyles
ParseError
PresetDef
A saved bundle of arguments invoked by name (@name / -p name). Keys mirror the explicit flag forms; explicit CLI args layer on top.
Recipe
A unified recipe: one named, reusable definition that can act as a template fragment ({@name}), a saved command (@name / -p), a named field, or a custom output format. See the README (Recipes and configuration). Recipes translate down to the existing variable/preset/format machinery.

Enums§

Escape
How interpolated field values are escaped for the surrounding output format. Html makes values safe in HTML; Csv/Tsv/Md quote or clean cells for those table dialects. This single enum replaces the old split between a framed-format Escape and a table Quote.
Json

Functions§

builtin_formats
The built-in csv/tsv/md output formats, as single $-DSL templates: a $cols( $key ) header row, then $rows( … ) per record. Seeded so they’re runnable by name (@csv, --format md) and overridable by a [recipe.*].
column
Build a Column from a field name/path (e.g. ts, user.id).
default_variables
The built-in default template variables, used when no config overrides them. Shared by the CLI and the TUI so both render records identically.
expanded_format
Inline ${@name} / ${?@name} recipe includes in a $-DSL template, expanding each to the named variable’s template (recursively). Everything else — fields, $( … ) repetitions, $if( … ) / $match( … ) blocks — passes through untouched for the formatter to parse.
get_config
matches_all
All filters must match (AND).
parse_datetime
Parse a timestamp to nanoseconds since the Unix epoch, for chronological ordering of >/< filters. Covers the common log formats without a datetime dependency:
parse_json
parse_number
Parse a number from a field value for ordering/aggregation, tolerating a trailing unit like the ms in "6.193 ms" or a %/s suffix that logs often attach. Strict f64 parsing is tried first; otherwise the leading numeric run (optional sign, digits, decimal, exponent) is taken and parsed, so "6.193 ms" -> 6.193, "200ms" -> 200, and "ok" -> None. This lets n>500 filters and stats work on human-formatted numeric fields.
redact
Replace the value of any field matching a pattern with “***”. Patterns: a bare key (password) or *.key match that key at any depth; a dotted path (fields.message) matches that rooted path (array indices are transparent, so spans.method redacts method in every element of spans). Applied recursively.