taillight (you may alias as tl) is a fast, terminal-based log viewer written in Rust. It tail-indexes growing logs in real-time, performing lazy offsets parsing (JSON or plaintext), and renders them in top-bar tabs and tmux-like split layouts.
- Lazy Tail Indexing: Background indexing of log file offsets keeps memory usage low and scrolling instantaneous, even on gigabyte-sized files.
- Tmux-like Split Layouts: Split your viewport vertical, horizontal, or in a 2x2 grid to watch different filters simultaneously.
- Structured Log Parsing: Automatically detects and parses JSON formatted logs (
level,message,time) and standard plaintext log severities ([INFO],[ERROR], etc.). - Real-time Filters: Add (
f), delete (x/c), or rename (r) filters on-the-fly. Filters filter background offsets in concurrent tasks, avoiding UI freeze. - Interactive Highlight: Highlight text patterns using regex (
s) and jump between matching lines (n/N). - Flexible Config Loading & Export: Load settings automatically from local directory or user home config files, with interactive exports (
e).
Make sure you have Rust and Cargo installed, then run:
cargo build --releaseThe compiled binary will be generated at ./target/release/taillight.
Tip
You can create a shell alias tl to invoke taillight easily:
alias tl="./target/release/taillight"taillight path/to/app.logtail -f app.log | taillightOverride the default layout using the -l or --layout option (single, vertical, horizontal, grid / split2x2):
taillight app.log -l gridBy default, taillight looks for taillight_config.json in the current working directory, then in home folders. You can pass a specific path using -c / --config:
taillight app.log -c custom_rules.jsonYou can launch taillight with the --no-timestamps flag to hide parsed timestamps:
taillight app.log --no-timestampsBy default, pressing Ctrl-C kills both the writing process in the pipeline and exits taillight.
You can change this using --ctrl-c-behavior to only kill the writer process, allowing you to browse the captured logs in TUI:
# Keep taillight open after Ctrl-C stops the stream
some_generator | taillight --ctrl-c-behavior kill-writerYou can start taillight with word wrapping enabled using -w or --word-wrap option:
taillight app.log -w- Log Levels (Trace, Debug, Info, Warn, Error, Fatal):
taillight's built-in log level classifier is completely case-insensitive by default. Values like[info],[Info], or[INFO](as well as JSON level values like"warning","Warn", etc.) are detected and filtered identically. - Regex Filters & Highlights (
/andskeys): Custom regular expression filters on tabs or highlight queries are case-sensitive by default. To perform case-insensitive keyword filtering or highlighting, prepend your regex with the(?i)modifier (e.g.(?i)stripewill matchstripe,Stripe, orSTRIPE).
When in Normal Mode:
| Key | Action |
|---|---|
q |
Quit the application cleanly |
? / H |
Show the quick help bar |
/ |
Edit active filter's regex pattern |
s |
Set/edit regex highlight query for the active pane |
n / N |
Jump forward/backward to the next highlight match |
f |
Create a custom filter (prompts for Name and Regex filter) |
t |
Toggle time display (show/hide timestamps) on the fly |
C |
Toggle Ctrl-C behavior (Kill All & Exit / Kill Writer Only) on the fly |
w |
Toggle word wrapping (show wrapped lines) on the fly |
r |
Rename the current filter |
x / c |
Delete the current filter (except system default filters) |
e |
Export current view config (prompts for destination filename) |
v |
Cycle layout modes (Single, SplitVertical, SplitHorizontal, Split2x2) |
Tab |
Switch focus forward to the next pane |
Shift + Tab |
Switch focus backward to the previous pane |
h / l or ← / → |
Cycle active filter index in the current pane |
j / k or ↓ / ↑ |
Scroll logs down/up by 1 line |
Ctrl + d / Ctrl + u |
Scroll logs down/up by half-screen |
g / G |
Jump to the very beginning / end of logs |
0 to 9 |
Jump directly to filter index 0-9 in the active pane |
Esc |
Clear active prompts or return to Normal Mode |
For more details on setting up custom layouts and filter rules, see config.md.
