Colorized live log viewer for your terminal.
Tail files or piped stdin with automatic log-level and keyword highlighting. Zero dependencies. Works in Python 3.8+.
Logs are noisy. tailr makes them readable at a glance:
- Level highlighting —
INFO,WARN,ERROR,FATAL,DEBUG,TRACEget distinct colors. - Keyword highlighting —
error,failed,exception,traceback,panicpop in bright red. - Timestamp coloring — dates and times are dimmed so the signal stands out.
- Live follow — watch logs grow in real time, just like
tail -f. - Filter on the fly — regex grep, or filter by log level.
- Zero dependencies — pure Python stdlib. No install drama, no bloat.
pip install tailrOr run without installing:
pipx run tailr --helpVia Docker:
docker run --rm ghcr.io/dsk-dev-ai/tailr --help# Colorize a log file (last 10 lines)
tailr app.log
# Follow a growing log live
tailr -f app.log
# Follow with more history
tailr -f -n 200 app.log
# Filter by log level
tailr -l ERROR app.log
# Grep with a regex, live
tailr -f -g "kafka|redis" app.log
# Pipe anything in
docker logs -f app | tailr
kubectl logs -f pod | tailr
journalctl -f | tailr -l WARN| Flag | Description |
|---|---|
-f, --follow |
Keep tailing appended lines (like tail -f) |
-n, --lines N |
Show N lines from the end (default 10) |
-g, --grep REGEX |
Only show lines matching a regex |
-l, --level LVL |
Only show lines with this level (ERROR, WARN, …) |
--version |
Print version |
INFO -> blue
DEBUG -> gray
WARN -> orange
ERROR -> red
FATAL -> magenta
TRACE -> gray
keywords -> bright red + bold
timestamps-> dim
Set NO_COLOR=1 to disable colorization, or FORCE_COLOR=1 to force it.
tailr streams lines and applies a lightweight ANSI colorizer powered by a few
small regexes — no external parsing libs, no heuristics beyond the log shape.
It respects isatty() to avoid spewing escape codes into pipelines.
python -m pytestTested on Python 3.8–3.12 via GitHub Actions.
Enjoy tailr? Keep it free and dependency-free by becoming a sponsor on GitHub 💜.
tailr · Colorized logs you can actually read.