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
| Long | Short | Description |
|---|---|---|
| --version | -V | Show version and license |
| --file | -f | Read from file instead of stdin |
| --filter | -F | Regex pattern to filter log lines |
| --ignore-case | -i | Case-insensitive filter |
| --no-follow | -n | Read all input then exit |
| --json | -j | Pretty-print JSON log lines |
| --quiet | -q | Only 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
Downloads
Verify integrity
SHA256 checksums