Skip to main content

Module format

Module format 

Source

Structs§

DisplayRenderer
Pairs a DisplayTemplate with the format’s regex so callers can render any single line in one call. Owns its inputs so it’s Send-friendly.
DisplayTemplate
Parsed display template (display = '[<ts>] <level> <msg>').
Group
A user-defined CLI shortcut. When tess --<group_name> appears in argv, the group’s flags are expanded inline and remaining positionals become --filter arguments.
LogFormat
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.

Functions§

expand_argv
load_all
Load all formats: built-ins first, then any in ~/.config/tess/formats.toml (which override built-ins of the same name). Returns the compiled map keyed by format name.
load_groups
Load all user-defined groups from ~/.config/tess/formats.toml. Built-ins are not provided — groups are entirely user-defined. Validates that group names don’t shadow built-in flag names.
print_format_list
Print one line per format, with the named field list, to stdout. Used by --list-formats.