1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216
|
Metadata-Version: 2.1
Name: toolong
Version: 1.5.0
Summary: A terminal log file viewer / tailer / analyzer
Home-page: https://github.com/textualize/toolong
License: MIT
Author: Will McGugan
Author-email: will@textualize.io
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: click (>=8.1.7,<9.0.0)
Requires-Dist: textual (>=0.58.0,<0.59.0)
Requires-Dist: typing-extensions (>=4.9.0,<5.0.0)
Project-URL: Documentation, https://github.com/textualize/toolong
Project-URL: Repository, https://github.com/textualize/toolong
Description-Content-Type: text/markdown
<p align="center">
<img src="https://github.com/Textualize/toolong/assets/554369/07f286c9-ac8d-44cd-905a-062a26060821" alt="A Kookaburra sitting on a scroll" width="300" >
</p>
[](https://discord.gg/Enf6Z3qhVr)
# Toolong
A terminal application to view, tail, merge, and search log files (plus JSONL).
<details>
<summary> 🎬 Viewing a single file </summary>
<div align="center">
<video src="https://github.com/Textualize/tailless/assets/554369/a434d427-fa9a-44bf-bafb-1cfef32d65b9" width="400" />
</div>
</details>
## Keep calm and log files
See [Toolong on Calmcode.io](https://calmcode.io/shorts/toolong.py) for a calming introduction to Toolong.
## What?
<img width="40%" align="right" alt="Screenshot 2024-02-08 at 13 47 28" src="https://github.com/Textualize/toolong/assets/554369/1595e8e0-f5bf-428b-9b84-f0b5c7f506a1">
- 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
<table>
<tr>
<td>
<img width="100%" alt="Screenshot 2024-02-08 at 13 47 28" src="https://github.com/Textualize/toolong/assets/554369/1595e8e0-f5bf-428b-9b84-f0b5c7f506a1">
</td>
<td>
<img width="100%" alt="Screenshot 2024-02-08 at 13 48 04" src="https://github.com/Textualize/toolong/assets/554369/c95f0cf4-426d-4d25-b270-eec0f4cfc86f">
</td>
</tr>
<tr>
<td>
<img width="100%" alt="Screenshot 2024-02-08 at 13 49 22" src="https://github.com/Textualize/toolong/assets/554369/45e7509c-ffed-44cc-b3e6-f2a7a276bbe5">
</td>
<td>
<img width="100%" alt="Screenshot 2024-02-08 at 13 50 04" src="https://github.com/Textualize/toolong/assets/554369/6840b626-539f-4ef9-88d9-25e0b96036b7">
</td>
</tr>
</table>
### Videos
<details>
<summary> 🎬 Merging multiple (compressed) files </summary>
<div align="center">
<video src="https://github.com/Textualize/tailless/assets/554369/efbbde11-bebf-44ff-8d2b-72a84b542b75" />
</div>
</details>
<details>
<summary> 🎬 Viewing JSONL files </summary>
<div align="center">
<video src="https://github.com/Textualize/tailless/assets/554369/38936600-34ee-4fe1-9fd3-b1581fc3fa37" />
</div>
</details>
<details>
<summary> 🎬 Live Tailing a file </summary>
<div align="center">
<video src="https://github.com/Textualize/tailless/assets/554369/7eea6a0e-b30d-4a94-bb45-c5bff0e329ca" />
</div>
</details>
## How?
Toolong is currently best installed with [pipx](https://github.com/pypa/pipx).
```bash
pipx install toolong
```
You could also install Toolong with Pip:
```bash
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:
```bash
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:
```bash
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:
```bash
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:
```bash
tree / | tl
```
## Who?
This [guy](https://github.com/willmcgugan). An ex web developer who somehow makes a living writing terminal apps.
---
## History
If you [follow me](https://twitter.com/willmcgugan) 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](https://discord.gg/Enf6Z3qhVr).
## Thanks
I am grateful for the [LogMerger](https://github.com/ptmcg/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](https://lnav.org/) as a more mature alternative.
|