# Toolong — Terminal Application for Viewing and Tailing Log Files > A TUI log file viewer by Textualize that supports tailing, searching, merging, and filtering log files and JSONL data. ## Install Save in your project root: # Toolong — Terminal Application for Viewing and Tailing Log Files ## Quick Use ```bash pip install toolong tl /var/log/syslog tl --merge access.log error.log tl --tail /var/log/auth.log ``` ## Introduction Toolong is a terminal-based log file viewer built by Textualize, the team behind Rich and Textual. It handles large log files efficiently, supports live tailing, merging of multiple log files by timestamp, and provides interactive search and filtering with syntax highlighting. ## What Toolong Does - Opens and navigates large log files without loading the entire file into memory - Tails log files in real time with automatic scrolling - Merges multiple log files into a single chronological view - Highlights timestamps, log levels, and key patterns with syntax highlighting - Searches log content with regex support and result navigation ## Architecture Overview Toolong is built on the Textual TUI framework in Python. It uses memory-mapped file access to handle files of any size without loading them entirely into RAM. The timestamp parser supports common log formats and uses them for merge ordering. The rendering pipeline leverages Rich for syntax highlighting and Textual for the interactive widget layout. ## Self-Hosting & Configuration - Install via pip: `pip install toolong` or pipx: `pipx install toolong` - Open a file: `tl /path/to/logfile.log` - Tail a file: `tl --tail /var/log/syslog` - Merge multiple files: `tl --merge file1.log file2.log file3.log` - Supports JSONL files with automatic field extraction ## Key Features - Memory-efficient handling of multi-gigabyte log files - Live tail mode with auto-scroll and pause on scroll-up - Timestamp-aware merge of multiple log sources into one view - JSONL support with structured field display - Built on Textual for a polished, responsive terminal interface ## Comparison with Similar Tools - **less** — Universal pager but no syntax highlighting, merging, or live tailing - **lnav** — Feature-rich log navigator; Toolong is lighter and easier to install via pip - **tail -f** — Basic tailing; no search, highlighting, or file merging - **multitail** — Tails multiple files; Toolong adds timestamp-merged views and search ## FAQ **Q: How does it handle large files?** A: It uses memory-mapped I/O so it can open multi-gigabyte files without loading them into RAM. **Q: Can it merge logs from different formats?** A: Yes. It auto-detects timestamp formats and interleaves lines chronologically. **Q: Does it support structured logs?** A: Yes. JSONL files are parsed and displayed with extracted fields. **Q: What terminals are supported?** A: Any terminal that supports 256 colors or true color, including iTerm2, kitty, WezTerm, and most Linux terminals. ## Sources - https://github.com/Textualize/toolong - https://pypi.org/project/toolong/ --- Source: https://tokrepo.com/en/workflows/asset-9f591478 Author: AI Open Source