Skip to content

Commit 977cb69

Browse files
committed
update info for 0.7.7 release
1 parent badea38 commit 977cb69

File tree

1 file changed

+81
-35
lines changed

1 file changed

+81
-35
lines changed

README.md

Lines changed: 81 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,40 @@
88
<a href="https://goreportcard.com/report/github.com/Lifailon/lazyjournal"><img src="https://goreportcard.com/badge/github.com/Lifailon/lazyjournal" alt="Go Report"></a>
99
<a href="https://pkg.go.dev/github.com/Lifailon/lazyjournal"><img src="https://pkg.go.dev/badge/github.com/Lifailon/lazyjournal.svg" alt="Go Reference"></a>
1010
<a href="https://github.com/Lifailon/Kinozal-Bot/blob/rsa/LICENSE"><img title="License"src="https://img.shields.io/github/license/Lifailon/Kinozal-Bot?logo=readme&color=white"></a>
11-
<br>
12-
<a href="https://aur.archlinux.org/packages/lazyjournal"><img title="Arch Linux" src="https://img.shields.io/aur/version/lazyjournal?logo=arch-linux&color=blue"></a>
13-
<a href="https://anaconda.org/conda-forge/lazyjournal"><img title="conda-forge" src="https://img.shields.io/conda/vn/conda-forge/lazyjournal?logo=anaconda&color=green"></a>
14-
<a href="https://formulae.brew.sh/formula/lazyjournal"><img title="Homebrew" src="https://img.shields.io/homebrew/v/lazyjournal?logo=homebrew&color=yellow"></a>
11+
<a href="https://github.com/avelino/awesome-go"><img src="https://awesome.re/mentioned-badge.svg" alt="Mentioned in Awesome Go"></a>
12+
<br>
13+
<a href="https://aur.archlinux.org/packages/lazyjournal"><img title="Arch Linux" src="https://img.shields.io/aur/version/lazyjournal?logo=arch-linux&color=blue&label=AUR"></a>
14+
<a href="https://anaconda.org/conda-forge/lazyjournal"><img title="Conda Forge" src="https://img.shields.io/conda/vn/conda-forge/lazyjournal?logo=anaconda&color=green&label=Conda"></a>
15+
<a href="https://formulae.brew.sh/formula/lazyjournal"><img title="Homebrew" src="https://img.shields.io/homebrew/v/lazyjournal?logo=homebrew&color=yellow&label=Homebrew"></a>
16+
<a href="https://hub.docker.com/r/lifailon/lazyjournal"><img title="Docker Hub" src="https://img.shields.io/docker/image-size/lifailon/lazyjournal/latest?logo=docker&color=blue&label=Docker+Hub"></a>
1517
</p>
1618

17-
Terminal user interface for reading logs from `journalctl`, file system, Docker and Podman containers, as well Kubernetes pods for quick viewing and filtering with fuzzy find (like `fzf`), regex support (like `grep`) and coloring the output, written in Go with the [awesome-gocui](https://github.com/awesome-gocui/gocui) (fork [gocui](https://github.com/jroimartin/gocui)) library.
19+
Terminal user interface for reading logs from `journalctl`, file system, Docker and Podman containers, as well Kubernetes pods for quick viewing and filtering with fuzzy find, regex support and coloring the output, written in Go with the [awesome-gocui](https://github.com/awesome-gocui/gocui) (fork [gocui](https://github.com/jroimartin/gocui)) library.
1820

19-
This tool is inspired by and with love for [LazyDocker](https://github.com/jesseduffield/lazydocker) and [LazyGit](https://github.com/jesseduffield/lazygit), as well as is included in [Awesome-TUIs](https://github.com/rothgar/awesome-tuis?tab=readme-ov-file#development) and [Awesome-Docker](https://github.com/veggiemonk/awesome-docker?tab=readme-ov-file#terminal-ui), check out other useful projects on the repository pages.
21+
This tool is inspired by and with love for [LazyDocker](https://github.com/jesseduffield/lazydocker) and [LazyGit](https://github.com/jesseduffield/lazygit). It is also included in [Awesome-Go](https://github.com/avelino/awesome-go?tab=readme-ov-file#logging), [Awesome-TUIs](https://github.com/rothgar/awesome-tuis?tab=readme-ov-file#development) and [Awesome-Docker](https://github.com/veggiemonk/awesome-docker?tab=readme-ov-file#terminal-ui), check out other useful projects on the repository pages.
2022

2123
![interface](/img/regex.png)
2224

23-
## Functional
25+
## Features
2426

2527
- Simple installation, to run download one executable file without dependencies and settings.
26-
- Displays the current log output in real-time (updated every 5 seconds, file logs are updated only when there are changes).
27-
- List of all units (`services`, `sockets`, etc.) via `systemctl` with current running status.
28-
- View all system and user journals via `journalctl` (tool for reading logs from [systemd-journald](https://github.com/systemd/systemd/tree/main/src/journal)).
28+
- Centralized search for the required journal by filtering all lists (log sources).
29+
- Streaming output of new events from the selected journal (like `tail`).
30+
- List of all units (`services`, `sockets`, etc.) with current running status from `systemd` via `systemctl`.
31+
- View all system and user journals via `journalctl` (tool for reading logs from [journald](https://github.com/systemd/systemd/tree/main/src/journal)).
2932
- List of all system boots for kernel log output.
30-
- File system logs (example, for `Apache` or `Nginx`), as well as `syslog` or `messages`, `dmesg` for kernel logs, etc.
31-
- List of all log files of descriptors used by processes, as well as all log files in the home directories of users.
32-
- Reading archived logs (`gz`, `xz` or `bz2` format), packet capture (`pcap` format) and Apple System Log (`asl` format).
33+
- File system logs such as for `Apache` or `Nginx`, as well as `syslog`, `messages`, etc. from `/var/log`.
34+
- Lists all log files in users home directories, as well as descriptor log files used by processes.
35+
- Reading archive logs truncated during rotation (`gz`, `xz` and `bz2` formats), Packet Capture (`pcap` format) and Apple System Log (`asl` format).
3336
- Docker containers (including `timestamp` and `stderr`), Podman pods and the Docker Swarm services.
34-
- Kubernetes pods via `kubectl`
35-
- Windows Event Logs (in test mode via `powershell` and reading via `wevtutil`) and application logs from Windows file system.
36-
- Filtering lists to find the desired journal.
37+
- Kubernetes pods via `kubectl`.
38+
- Windows Event Logs via `PowerShell` and `wevtutil`, as well as application logs from Windows file system.
3739

3840
Supports 3 filtering modes:
3941

4042
- **Default** - case sensitive exact search.
41-
- **Fuzzy** - custom inexact case-insensitive search (searches for all phrases separated by a space anywhere on a line).
42-
- **Regex** - search with regular expression support (based on the built-in [regexp](https://pkg.go.dev/regexp) library), case insensitive by default (in case a regular expression syntax error occurs, the input field will be highlighted in red).
43+
- **Fuzzy** (like `fzf`) - custom inexact case-insensitive search (searches for all phrases separated by a space anywhere on a line).
44+
- **Regex** (like `grep`) - search with regular expression support, based on the built-in [regexp](https://pkg.go.dev/regexp) library, case-insensitive by default (in case a regular expression syntax error occurs, the input field will be highlighted in red).
4345

4446
## Coloring
4547

@@ -50,7 +52,7 @@ Supported coloring groups for output:
5052
- **Green** - keywords indicating success.
5153
- **Red** - keywords indicating error.
5254
- **Blue** - statuses (info, debug, etc), actions (install, update, etc) and HTTP methods (GET, POST, etc).
53-
- **Light blue** - numbers (date, time, bytes, versions, percentage, IP and MAC addresses).
55+
- **Light blue** - numbers (date, time, bytes, versions, percentage, integers, IP and MAC addresses).
5456

5557
A full list of all keywords can be found in the [color.log](/color.log) file (used for testing only). If you have suggestions for improving coloring (e.g. adding new words), you can open an [issue](https://github.com/Lifailon/lazyjournal/issues) for a new feature.
5658

@@ -62,12 +64,12 @@ Binaries are available for download on the [releases](https://github.com/Lifailo
6264

6365
List of supported systems and architectures in which functionality is checked:
6466

65-
| OS | amd64 | arm64 | Systems |
66-
| - | - | - | - |
67-
| Linux ||| Raspberry Pi (`aarch64`), Oracle Linux (RHEL-based in WSL environment), Arch Linux, Rocky Linux, Ubuntu Server 20.04.6 and above |
68-
| Darwin ||| macOS Sequoia 15.2 `x64` on MacBook and the `arm64` in GitHub Actions |
69-
| BSD || | OpenBSD 7.6 and FreeBSD 14.2 |
70-
| Windows || | Windows 10 and 11 |
67+
| OS | amd64 | arm64 | Systems |
68+
| - | - | - | - |
69+
| Linux ||| Raspberry Pi (`aarch64`), Oracle Linux (RHEL-based in WSL environment), Arch Linux, Rocky Linux, Ubuntu Server 20.04.6 and above. |
70+
| Darwin ||| macOS Sequoia 15.2 `x64` on MacBook and the `arm64` in GitHub Actions. |
71+
| BSD || | OpenBSD 7.6 and FreeBSD 14.2. |
72+
| Windows || | Windows 10 and 11. |
7173

7274
### Unix-based
7375

@@ -110,6 +112,29 @@ Use the following command to install `lazyjournal` using [Homebrew](https://form
110112
brew install lazyjournal
111113
```
112114

115+
### Docker (Debian-based)
116+
117+
To run the interface in a container, download [docker-compose](/docker-compose.yml) and use the image from [Docker Hub](https://hub.docker.com/r/lifailon/lazyjournal):
118+
119+
```shell
120+
mkdir lazyjournal && cd lazyjournal
121+
curl -sS https://raw.githubusercontent.com/Lifailon/lazyjournal/main/docker-compose.yml -o docker-compose.yml
122+
docker-compose up -d
123+
docker exec -it lazyjournal lazyjournal
124+
```
125+
126+
The image is based on Debian with `systemd` and docker cli pre-installed. The necessary **read-only** permissions are already preset in `docker-compose` to support all log sources from the host system (review it to customize for your individual use).
127+
128+
Supports running in the web interface via [ttyd](https://github.com/tsl0922/ttyd) and mouse control. To do this, edit the variables in the `.env` file:
129+
130+
```shell
131+
TTYD=true
132+
PORT=5555
133+
# Credentials for accessing the Web interface (optional)
134+
USERNAME=admin
135+
PASSWORD=admin
136+
```
137+
113138
### Windows
114139

115140
Use the following command to quickly install in your PowerShell console:
@@ -144,15 +169,33 @@ go install github.com/Lifailon/lazyjournal@latest
144169

145170
You can run the interface from anywhere:
146171

147-
```shell
148-
lazyjournal # Run interface
149-
lazyjournal --help, -h # Show help
150-
lazyjournal --version, -v # Show version
151-
lazyjournal --audit, -a # Show audit information
172+
```
173+
lazyjournal Run interface
174+
lazyjournal --help, -h Show help
175+
lazyjournal --version, -v Show version
176+
lazyjournal --audit, -a Show audit information
177+
lazyjournal --tail, -t Change the number of log lines to output (default: 100000, range: 5000-200000)
178+
lazyjournal --update, -u Change the auto refresh interval of the log output (default: 5, range: 2-10)
179+
lazyjournal --disable-color, -d Disable output coloring
180+
lazyjournal --command-color, -c Coloring in command line mode
152181
```
153182

154183
Access to all system logs and containers may require elevated privileges for the current user.
155184

185+
Information in the subtitle of the `Logs` window:
186+
187+
- `tail` - maximum number of log lines to load.
188+
- `update` - current output auto-update status (disabled when manually scrolling the output).
189+
- `interval` - auto-update interval for output in seconds (file logs are updated only when there are changes).
190+
- `color` - whether the output coloring mode is currently enabled or disabled.
191+
192+
Also output coloring is supported in command line mode:
193+
194+
```shell
195+
alias lj=lazyjournal
196+
cat /var/log/syslog | lj -c
197+
```
198+
156199
## Build
157200

158201
Clone the repository and run the project:
@@ -195,17 +238,19 @@ Testing in BSD-based systems is done in a home environment using [usup](https://
195238
- `F1` - show help on hotkeys.
196239
- `Tab` - switch between windows.
197240
- `Shift+Tab` - return to previous window.
198-
- `Left/Right` - switch between journal lists in the selected window.
199241
- `Enter` - selection a journal from the list to display log output.
242+
- `Left/Right` - switch between journal lists in the selected window.
200243
- `<Up/PgUp>` and `<Down/PgDown>` - move up and down through all journal lists and log output, as well as changing the filtering mode in the filter window.
201244
- `<Shift/Alt>+<Up/Down>` - quickly move up and down through all journal lists and log output every `10` or `100` lines (`500` for log output).
202245
- `<Shift/Ctrl>+<U/D>` - quickly move up and down (alternative for macOS).
203246
- `Ctrl+A` or `Home` - go to top of log.
204247
- `Ctrl+E` or `End` - go to the end of the log.
248+
- `Alt+Left/Right` - change the number of log lines to output (default: `100000`, range: `5000-200000`).
249+
- `Shift+Left/Right` - change the auto refresh interval of the log output (default: `5`, range: `2-10`).
205250
- `Ctrl+Q` - enable or disable built-in output coloring.
206251
- `Ctrl+S` - enable or disable coloring via [tailspin](https://github.com/bensadeh/tailspin).
207252
- `Ctrl+R` - update all log lists.
208-
- `Ctrl+W` - clear text input field for filter to quickly update current log output without filtering.
253+
- `Ctrl+W` - clear text input field for filter to quickly update current log output.
209254
- `Ctrl+C` - exit.
210255

211256
## Contributing
@@ -215,14 +260,15 @@ Since this is my first Go project, there may be some bad practices, BUT I want t
215260
Thanks to all participants for their contributions:
216261

217262
- [Matteo Giordano](https://github.com/malteo) for upload and update the package in `AUR`.
218-
- [Ueno M.](https://github.com/eunos-1128) for upload and update the package in `homebrew` and `conda`.
263+
- [Ueno M.](https://github.com/eunos-1128) for upload and update the package in `Homebrew` and `Conda`.
219264

220265
You can also upload the package yourself to any package manager you use and make [Pull Requests](https://github.com/Lifailon/lazyjournal/pulls).
221266

222267
## Alternatives
223268

224-
- [lnav](https://github.com/tstack/lnav) - The Logfile Navigator is a **log file** viewer for the terminal.
225-
- [Dozzle](https://github.com/amir20/dozzle) - is a small lightweight application with a web based interface to monitor **Docker logs**.
269+
- [Lnav](https://github.com/tstack/lnav) - The Logfile Navigator is a log file viewer for the terminal.
270+
- [TooLong](https://github.com/Textualize/toolong) - A terminal application to view, tail, merge, and search log files.
271+
- [Dozzle](https://github.com/amir20/dozzle) - A small lightweight application with a web based interface to monitor Docker logs.
226272

227273
If you like using TUI tools, try [multranslate](https://github.com/Lifailon/multranslate) for translating text in multiple translators simultaneously and LLM, with support for translation history and automatic language detection.
228274

0 commit comments

Comments
 (0)