tailspin

Log file highlighter (binary: tspin) that colors dates, numbers, IPs, UUIDs, URLs and more in any log format, with no config, and pages output through less.

install

tailspin is a log file highlighter whose binary is named tspin. It reads a log file line by line and runs a set of matchers against each line, recognizing dates, durations, numbers, severity keywords, URLs, IPv4 addresses, UUIDs, Unix file paths, HTTP methods, quoted strings, key-value pairs, pointer addresses and Unix processes. It makes no assumptions about log format or field position, so it needs no configuration and highlights consistently across different log files.

By default, tspin application.log opens the highlighted file in less. When input is piped in, it prints to stdout instead, as in kubectl logs -f pod_name | tspin or journalctl -f | tspin. The --exec flag runs a command in the background and shows its output in less, for example tspin --exec 'kubectl logs -f pod_name'. The -f/--follow flag tails a file, and the TAILSPIN_PAGER environment variable swaps in a different pager.

Highlight groups can be toggled with --enable and --disable. Extras such as ipv6 and jvm-stack-trace are added with --extras or the TAILSPIN_EXTRAS variable. Styles are customized in ~/.config/tailspin/theme.toml, which can be generated with tspin --generate-default-theme. The theme file also supports custom keywords and regex highlighters with one capture group. Ad hoc keyword highlighting is available from the command line, e.g. --highlight=red:error,fail. It is aimed at developers, SREs and anyone reading application logs, kubectl output or system logs in a terminal. It is also available as a Rust crate.

Installation

# via Homebrew
brew install tailspin
# via Cargo
cargo install tailspin
# via Scoop
scoop install tailspin

tailspin highlighting a log file

tailspin custom on-the-fly highlights

Alternatives & related tools

add a badge to your README

Maintain tailspin? Show that it's featured on trmn. The badge links back to this page.

Featured on trmn
Markdown
[![Featured on trmn](https://www.trmn.sh/badge/tailspin.svg)](https://www.trmn.sh/tools/tailspin?utm_source=badge)
HTML
<a href="https://www.trmn.sh/tools/tailspin?utm_source=badge"><img src="https://www.trmn.sh/badge/tailspin.svg" alt="Featured on trmn" height="20"></a>