MIT License

项目介绍

Textualize/toolong 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,采用 MIT License 许可证,目前获得 4.0k 个 Star、101 次 Fork。

仓库全名
Textualize/toolong
开源许可证
MIT License
Star 数
4.0k
Fork 数
101
未关闭 Issue
38

README 摘要

Toolong A terminal application to view, tail, merge, and search log files (plus JSONL). 🎬 Viewing a single file   Keep calm and log files See Toolong on Calmcode.io for a calming introduction to Toolong. What? 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…

完整内容见 GitHub 原始 README 或本页 。

常见问题

toolong 用什么语言开发?

主要使用 Python 编写,采用 MIT License 许可证,目前有 4.0k 个 Star。

toolong 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 toolong 的源码?

可以直接克隆仓库:git clone https://github.com/Textualize/toolong.git;安装与运行步骤见仓库 README。

toolong 最近还在维护吗?

仓库最近一次更新为 2024年8月6日,当前有 38 个未关闭 Issue;Star 数为 4.0k,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

A terminal application to view, tail, merge, and search log files (plus JSONL).

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
4191
价值分
2413
活跃状态
活跃

语言占比

Python

Release

README

A Kookaburra sitting on a scroll

Discord

Toolong

A terminal application to view, tail, merge, and search log files (plus JSONL).

🎬 Viewing a single file

 

Keep calm and log files

See Toolong on Calmcode.io for a calming introduction to Toolong.

What?

Screenshot 2024-02-08 at 13 47 28
  • 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.

Why?

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.

Screenshots

Screenshot 2024-02-08 at 13 47 28 Screenshot 2024-02-08 at 13 48 04
Screenshot 2024-02-08 at 13 49 22 Screenshot 2024-02-08 at 13 50 04

Videos

🎬 Merging multiple (compressed) files  
🎬 Viewing JSONL files  
🎬 Live Tailing a file  

How?

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.

Compatibility

Toolong works on Linux, macOS, and Windows.

Opening files

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.

Piping

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

Who?

This guy. An ex web developer who somehow makes a living writing terminal apps.


History

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.

Development

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.

Thanks

I am grateful for the LogMerger project which I referenced (and borrowed regexes from) when building Toolong.

Alternatives

Toolong is not the first TUI for working with log files. See lnav as a more mature alternative.

评论

暂无评论