Terminal user interface for journalctl
, file system logs, as well Docker and Podman containers for quick viewing and filtering with fuzzy find, regex support (like fzf
and grep
) and coloring the output, written in Go with the awesome-gocui (fork gocui) library.
This tool is inspired by and with love for LazyDocker and LazyGit, as well as is listed as Awesome-TUIs, check out the other useful projects in the repository page.
- Simple installation, to run it, just download a single executable file without dependencies.
- List of all units (services, sockets, etc.) via
systemctl
with current running status. - View all system and user journals via
journalctl
(tool for reading logs from systemd-journald). - List of all system boots for kernel log output.
- File system logs (example, for Apache or Nginx), as well as
syslog
ormessages
,dmesg
(kernel), etc. - List of all log files of descriptors used by processes, as well as all log files in the home directories of users.
- Reading archived logs (
gz
format). - Podman pods, Docker containers and Swarm services logs for all systems.
- Displays the currently selected log and filters output in real-time.
Supports 3 filtering modes:
- Default - case sensitive exact search.
- Fuzzy - custom inexact case-insensitive search (searches for all phrases separated by a space anywhere on a line).
- Regex - search with regular expression support (based on
regexp
library), case insensitive by default (in case a regular expression syntax error occurs, the input field will be highlighted in red).
Supported coloring groups for output:
- Green - keywords indicating success.
- Red - keywords indicating an error.
- Blue - statuses and action messages (debug, warning, etc and install, update, etc).
- Light Blue - numbers (date, time, bytes, ip and mac-addresses).
- Yellow - known names (host name and system users).
- Purple - url and full paths in the file system.
- Custom - unix processes.
This is an up-to-date roadmap in addition to the functionality described above.
- File system support for
MacOS
(darwin system) and theRHEL
based systems. - Syntax coloring for logging output (like
tailspin
). - Windows file system support (log files from
Program Files
and others directories). - Windows events via
PowerShell
. - Interface for scrolling and the mouse support.
- Support remote machines via
ssh
protocol.
Binaries for the Linux operating system are available on the releases page.
Development is carried out on the Ubuntu Server system, and is also tested on the Raspberry Pi (aarch64
platform), MacOS (x64
platform) and the WSL environment on the Oracle Linux system.
Run the command in the console to quickly install or update the stable version on Linux or MacOS:
curl https://raw.githubusercontent.com/Lifailon/lazyjournal/main/install.sh | bash
This command will run a script that will download the latest executable from the GitHub repository into your current user's home directory along with other executables (or create a directory) and grant execution permission.
You can also use Go for install the dev version. To do this, the Go interpreter must be installed on the system, for example, in Ubuntu you can use the SnapCraft package manager:
sudo snap install go --classic
grep -F 'export PATH=$PATH:$HOME/go/bin' $HOME/.bashrc || echo 'export PATH=$PATH:$HOME/go/bin' >> $HOME/.bashrc && source $HOME/.bashrc
go install github.com/Lifailon/lazyjournal@latest
If you're an Arch Linux user you can also install from the AUR with your favorite AUR helper, e.g.:
paru -S lazyjournal
Thank you Matteo Giordano for upload and update the package in AUR.
If you use other packag manager and want this package to be present there as well, open an issue or load it yourself and make Pull requests
.
You can launch the interface anywhere (no parameters are used):
lazyjournal
Access to all system logs and containers may require elevated privileges for the current user.
Windows is not currently supported, but the project will work to access Docker and Podman containers logs.
Clone the repository, install dependencies from go.mod
and run the project:
git clone https://github.com/Lifailon/lazyjournal
cd lazyjournal
go mod tidy
go run main.go
Check the code for linters using golangci-lint and build executables for different platforms and all systems:
bash build.sh
Tab
- switch between windows.Shift+Tab
- return to previous window.Left/Right
- switch between log lists in the selected window.Enter
- selection a journal from the list to display log.Up/Down
- move up or down through all journal lists and log output, as well as changing the filtering mode in the filter window.<Shift/Alt>+<Up/Down>
- quickly move up or down (every10
or500
lines) through all journal lists and log output.Ctrl+R
- refresh the current log manually and go to the bottom of the output.Ctrl+<D/W>
- clear text input field for filter to quickly update current log output without filtering.Ctrl+C
- exit.
Any contribution is welcome. If you want to implement a feature or fix something, please open an issue first.
- lnav - The Logfile Navigator is a log file viewer for the terminal.
- Dozzle - is a small lightweight application with a web based interface to monitor Docker logs.
If you like using TUI tools, try multranslate for translating text in multiple translators simultaneously, with support for translation history and automatic language detection.
This project is licensed under the MIT License. See the LICENSE file for details.
Copyright (C) 2024 Lifailon (Alex Kup)