A terminal application to view, tail, merge, and search log files (plus JSONL).
🎬 Viewing a single file
Â
Screen.Recording.2024-02-08.at.14.30.42.mov
See Toolong on Calmcode.io for a calming introduction to Toolong.
![Screenshot 2024-02-08 at 13 47 28](https://private-user-images.githubusercontent.com/554369/303731492-1595e8e0-f5bf-428b-9b84-f0b5c7f506a1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4MzgzMjQsIm5iZiI6MTczODgzODAyNCwicGF0aCI6Ii81NTQzNjkvMzAzNzMxNDkyLTE1OTVlOGUwLWY1YmYtNDI4Yi05Yjg0LWYwYjVjN2Y1MDZhMS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwNlQxMDMzNDRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hNGQxZWMwMzQxYmI4YzQ5Yjg1OTc2YjhmNmY3OTU2NGQ0YmY1ZTFiMzI1YjhlZGFmOTdkYWU4MmUyYWViZjcwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.yx9ZVMYhaTvRoqf6lZMX5QX55uw5uCKBDJ5APpD8Olo)
- Live tailing of log files.
- Syntax highlights common web server log formats.
- As fast to open a multiple-gigabyte file as it is to open a tiny text file.
- Support for JSONL files: lines are pretty printed.
- Opens .bz and .bz2 files automatically.
- Merges log files by auto detecting timestamps.
I spent a lot of time in my past life as a web developer working with logs, typically on web servers via ssh.
I would use a variety of tools, but my goto method of analyzing logs was directly on the server with *nix tools like as tail
, less
, and grep
etc.
As useful as these tools are, they are not without friction.
I built toolong
to be the tool I would have wanted back then.
It is snappy, straightforward to use, and does a lot of the grunt work for you.
![]() |
![]() |
![]() |
![]() |
🎬 Merging multiple (compressed) files
ÂScreen.Recording.2024-02-08.at.14.31.52.mov
🎬 Viewing JSONL files
ÂScreen.Recording.2024-02-08.at.14.32.46.mov
🎬 Live Tailing a file
ÂScreen.Recording.2024-02-08.at.15.23.38.mov
Toolong is currently best installed with pipx.
pipx install toolong
You could also install Toolong with Pip:
pip install toolong
Note
If you use pip, you should ideally create a virtual environment to avoid potential dependancy conflicts.
However you install Toolong, the tl
command will be added to your path:
tl
In the near future there will be more install methods, and hopefully your favorite package manager.
Toolong works on Linux, macOS, and Windows.
To open a file with Toolong, add the file name(s) as arguments to the command:
tl mylogfile.log
If you add multiple filenames, they will open in tabs.
Add the --merge
switch to open multiple files and combine them in to a single view:
tl access.log* --merge
In the app, press f1 for additional help.
In addition to specifying files, you can also pipe directly into tl
.
This means that you can tail data that comes from another process, and not neccesarily a file.
Here's an example of piping output from the tree
command in to Toolong:
tree / | tl
This guy. An ex web developer who somehow makes a living writing terminal apps.
If you follow me on Twitter, you may have seen me refer to this app as Tailless, because it was intended to be a replacement for a tail
+ less
combo.
I settled on the name "Toolong" because it is a bit more apt, and still had the same initials.
Toolong v1.0.0 has a solid feature set, which covers most of my requirements. However, there is a tonne of features which could be added to something like this, and I will likely implement some of them in the future.
If you want to talk about Toolong, find me on the Textualize Discord Server.
I am grateful for the LogMerger project which I referenced (and borrowed regexes from) when building Toolong.
Toolong is not the first TUI for working with log files. See lnav as a more mature alternative.