Skip to content

logtail

Gov0.2.0MIT

A terminal log viewer that colour-codes lines by log level (ERROR in red, WARN in yellow, INFO in blue, DEBUG in green) and supports regex filtering with case-insensitive mode. Detects and pretty-prints JSON log lines with coloured keys. Follows stdin in real-time like tail -f. Prints a summary on exit showing total, matched, and filtered line counts. Clean SIGINT handling.

LoggingObservabilityTUICLI

Features

  • Colour-coded log levels: ERROR/WARN/INFO/DEBUG/TRACE
  • Regex filtering with case-insensitive mode
  • JSON auto-detection with coloured pretty-print
  • Follow mode (stdin) and file mode
  • SIGINT summary: total matched filtered lines

Flags

LongShortDescription
--version-VShow version and license
--file-fRead from file instead of stdin
--filter-FRegex pattern to filter log lines
--ignore-case-iCase-insensitive filter
--no-follow-nRead all input then exit
--json-jPretty-print JSON log lines
--quiet-qOnly show matching lines, no status

Usage

terminal
$ tail -f app.log | logtail
$
$ logtail --file app.log --filter 'ERROR|timeout'
$
$ journalctl -fu nginx | logtail --json

Dependencies

stdlib only — bufio, regexp, encoding/json, os/signal

Install
$ curl -LO https://labs.stech-sol.com/downloads/logtail/0.2.0/logtail_linux_amd64
$ chmod +x logtail_linux_amd64
$ sudo mv logtail_linux_amd64 /usr/local/bin/logtail
About
Language
Go
Versionv0.2.0
LicenseMIT
RepositoryGitHub