bensadeh /tailspin

🌀 A log file highlighter

★ 8,013⑂ 140👁 18⑃ 170● 87▤ 36
RustCreated 2022-07-03
8,013
stars
+0+3+27
140
forks
18
watchers
170
prs
87
issues
36
releases
–
discussions

README

A log file highlighter



  


 Features

- 🪵 View (or tail) any log file of any format
- 🍰 No setup or config required
- 🌈 Highlights numbers, dates, IP-addresses, UUIDs, URLs and more
- ⚙️ All highlight groups are customizable
- 🧬 Easy to integrate with other commands
- 📦 Also available as a crate



 Table of Contents

 Overview
 Usage
 Installing
 Highlight Groups
 Customizing Highlight Groups
 Working with stdin and stdout
 Using the pager less
 Settings



 Overview

tailspin works by reading through a log file line by line, running a series of matchers
against each line. The matchers recognize patterns you expect to find in a logfile, like dates, numbers, severity
keywords and more.

tailspin does not make any assumptions on the format or position of the items it wants to highlight. For this reason,
it requires no configuration and the highlighting will work consistently across different logfiles.

 Usage

The binary name for tailspin is tspin.

console
 Read from file and view in less
tspin application.log

 Pipe something into tspin and print to stdout
echo "hello null" | tspin

 Read from stdin and print to stdout
kubectl logs [pod_name] --follow | tspin

 Run the provided command and view the output in less
tspin --exec='kubectl logs -f pod_name'
 

 Installing


Expand to view

 Package Managers

console
 Homebrew
brew install tailspin

 Cargo
cargo install tailspin

 Archlinux
pacman -S tailspin

 Nix
nix-shell -p tailspin

 NetBSD
pkgin install tailspin

 FreeBSD
pkg install tailspin

 Windows
scoop install tailspin


 From Source

console
cargo install --path .


Binary will be placed in ~/.cargo/bin, make sure you add the folder to your PATH environment variable.

 [!IMPORTANT]
 When building from source, make sure that you are using the latest version
 of less.



 Highlight Groups

 Defaults

The following highlight groups are enabled by default and can be toggled with --enable and --disable. The
keywords group covers the builtin keywords: log severities, booleans, nulls and the HTTP methods.

 Dates


  


 Durations


  


 Keywords


  


 URLs


  


 Numbers


  


 IPv4 Addresses


  


 Quotes


  


 Unix file paths


  


 HTTP methods


  


 UUIDs


  


 Key-value pairs


  


 Pointer addresses


  


 Unix processes


  


 Extras

Extras are highlight groups that are not enabled by default. They can be enabled with the --extras flag and are
always additive — they apply on top of whatever defaults or --enable/--disable configuration is active.

console
 Enable IPv6 highlighting in addition to the defaults
tspin application.log --extras ipv6

 Combine with --enable
tspin application.log --enable urls,numbers --extras ipv6


Available extras:

| Name                | Description                                            |
|---------------------|--------------------------------------------------------|
| ipv6              | Highlight IPv6 addresses                               |
| jvm-stack-trace   | Highlight JVM s

Snapshot: 2026-11-04T14:00:00Z · Data license Apache-2.0 · JSON