Expand description
Log parsing and styling utilities.
This module provides functionality to parse JSON and plain text log entries, detect log levels, extract timestamps, and style them for terminal display with syntax highlighting and theme support.
Structs§
- LogEntry
- A parsed log entry with its original text, pretty-printed version, severity level, optional parsed timestamp, and optional source identifier.
Enums§
Functions§
- format_
relative_ time - Formats a timestamp as a human-readable relative time string (e.g., “3s ago”, “2m ago”).
- parse_
log - Parses a raw log line into a structured
LogEntry. - style_
log - Styles a log entry with level-based coloring and optional search highlighting.